aboutsummaryrefslogtreecommitdiffstats
path: root/default.o.do
blob: 1d0fb411e505ee9afe370772e5a6d21c0af27035 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/env bash
set -e
redo-ifchg-pipe() { tr '\n' '\0' | xargs -r0 redo-ifchange; }
src=${1%.o}.c
if grep -q '@BUILD_CC host' "$src"; then
	tool=compile-host.tool
else
	tool=compile.tool
fi
redo-ifchange "$tool" .parse-deps.sed "$src"
sed -n 's|.*@BUILD_DEP \(.*\)|\1|p' "$src" | redo-ifchg-pipe
. "./$tool"
"${cmd[@]}" | sed -f .parse-deps.sed | redo-ifchg-pipe