aboutsummaryrefslogtreecommitdiffstats
path: root/.parse-deps.sed
diff options
context:
space:
mode:
Diffstat (limited to '.parse-deps.sed')
-rw-r--r--.parse-deps.sed16
1 files changed, 16 insertions, 0 deletions
diff --git a/.parse-deps.sed b/.parse-deps.sed
new file mode 100644
index 0000000..488782d
--- /dev/null
+++ b/.parse-deps.sed
@@ -0,0 +1,16 @@
+# remove target
+1s/^[^:]*: //
+# collapse lines
+:loop
+/\\$/ {
+ s|///*|/|g
+ s|$|//|
+ N
+ s|\\//. *||
+ b loop
+}
+# split on unescaped spaces
+s/\([^\]\) */\1\
+/g
+# unescape spaces
+s/\\ / /g