aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomasz Kramkowski <tk@the-tk.com>2021-07-14 17:11:29 +0100
committerTomasz Kramkowski <tk@the-tk.com>2021-07-14 17:16:24 +0100
commitc502072cd7ee1691b8cd426c8b23a091613378b3 (patch)
treee002b02c3c173873df19e2c5669647b0d08e19ca
parent5107f97c50b1ea37df341fd9b06f61694ebb9b3f (diff)
downloadpack-c502072cd7ee1691b8cd426c8b23a091613378b3.tar.gz
pack-c502072cd7ee1691b8cd426c8b23a091613378b3.tar.xz
pack-c502072cd7ee1691b8cd426c8b23a091613378b3.zip
Remove need for test.o.do by adding @BUILD_DEP directive
-rwxr-xr-xdefault.o.do4
-rw-r--r--test.c1
-rwxr-xr-xtest.o.do4
3 files changed, 4 insertions, 5 deletions
diff --git a/default.o.do b/default.o.do
index 121c3c0..16e98a0 100755
--- a/default.o.do
+++ b/default.o.do
@@ -1,4 +1,6 @@
#!/bin/bash -e
-redo-ifchange .compile .parse-depfile "${1%.o}.c"
+src=${1%.o}.c
+redo-ifchange .compile .parse-depfile "$src"
+sed -n 's|.*@BUILD_DEP \(.*\)|\1|p' "$src" | tr '\n' '\0' | xargs -0 redo-ifchange
. ./.compile
./.parse-depfile "${1%.o}.d" | tr '\n' '\0' | xargs -0 redo-ifchange
diff --git a/test.c b/test.c
index 5e68887..5d4eb7e 100644
--- a/test.c
+++ b/test.c
@@ -74,6 +74,7 @@ static bool do_check_bufequal(const char *file, int line, void *a_, void *b_, si
return false;
}
+// @BUILD_DEP test.inc
#include "test.inc"
TEST(unpack_simple0_float, "unpack simple float")
diff --git a/test.o.do b/test.o.do
deleted file mode 100755
index f90e621..0000000
--- a/test.o.do
+++ /dev/null
@@ -1,4 +0,0 @@
-#!/bin/bash
-redo-ifchange "test.inc"
-set -- "$1" "${2%.o}" "$3"
-. ./default.o.do