From 13b242e2fdfb020f29eaa302e1f7b0f6bb65395b Mon Sep 17 00:00:00 2001 From: Tomasz Kramkowski Date: Wed, 21 Jul 2021 23:58:33 +0100 Subject: .parse-depfile -> .parse-deps - as it's no longer used with files --- .licignore | 2 +- .parse-depfile | 15 --------------- .parse-deps | 15 +++++++++++++++ default.o.do | 4 ++-- 4 files changed, 18 insertions(+), 18 deletions(-) delete mode 100755 .parse-depfile create mode 100755 .parse-deps diff --git a/.licignore b/.licignore index 29d1e7b..4ac0ff0 100644 --- a/.licignore +++ b/.licignore @@ -1,7 +1,7 @@ *.do .gitignore .licignore -.parse-depfile +.parse-deps LICENSE README.md clean diff --git a/.parse-depfile b/.parse-depfile deleted file mode 100755 index cad20d9..0000000 --- a/.parse-depfile +++ /dev/null @@ -1,15 +0,0 @@ -#!/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 diff --git a/.parse-deps b/.parse-deps new file mode 100755 index 0000000..cad20d9 --- /dev/null +++ b/.parse-deps @@ -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 diff --git a/default.o.do b/default.o.do index a2a5e38..88fe853 100755 --- a/default.o.do +++ b/default.o.do @@ -1,6 +1,6 @@ #!/bin/bash -e redo-ifchg-pipe() { tr '\n' '\0' | xargs -r0 redo-ifchange; } src=${1%.o}.c -redo-ifchange .compile .parse-depfile "$src" +redo-ifchange .compile .parse-deps "$src" sed -n 's|.*@BUILD_DEP \(.*\)|\1|p' "$src" | redo-ifchg-pipe -. ./.compile | ./.parse-depfile | redo-ifchg-pipe +. ./.compile | ./.parse-deps | redo-ifchg-pipe -- cgit v1.2.3-54-g00ecf