aboutsummaryrefslogtreecommitdiffstats
path: root/.parse-deps
blob: e8dc74ba066ca3a4e283f0f6b236b28772b67573 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/sed -f
# remove target
1s/^[^:]*: //
# collapse lines
:loop
/\\$/ {
	s|///*|/|g
	s|$|//|
	N
	s|\\//. *||
	b loop
}
# split on unescaped spaces
s/\([^\]\)  */\1\
/g
# unescape spaces
s/\\ / /g