aboutsummaryrefslogtreecommitdiffstats
path: root/.parse-depfile
diff options
context:
space:
mode:
authorTomasz Kramkowski <tk@the-tk.com>2021-05-31 17:08:09 +0100
committerTomasz Kramkowski <tk@the-tk.com>2021-05-31 17:38:33 +0100
commita88ad680422949dfe2d16a544a529649c6d07109 (patch)
treedf4d9463a099d4b87cd0f201f80db5c5d628ffad /.parse-depfile
parent13ceac75a8ed37ddc02df2b41627329c4da24b04 (diff)
downloadpack-a88ad680422949dfe2d16a544a529649c6d07109.tar.gz
pack-a88ad680422949dfe2d16a544a529649c6d07109.tar.xz
pack-a88ad680422949dfe2d16a544a529649c6d07109.zip
Update build system to the latest luiml version
Diffstat (limited to '.parse-depfile')
-rwxr-xr-x.parse-depfile15
1 files changed, 15 insertions, 0 deletions
diff --git a/.parse-depfile b/.parse-depfile
new file mode 100755
index 0000000..cad20d9
--- /dev/null
+++ b/.parse-depfile
@@ -0,0 +1,15 @@
+#!/usr/bin/sed -f
+# remove target
+1s/^[^:]*: //
+# collapse lines
+:loop
+/\\$/ {
+ N
+ s/ \\\n//
+ b loop
+}
+# split on unescaped spaces
+s/\([^\]\) /\1\
+/g
+# unescape spaces
+s/\\ / /g