aboutsummaryrefslogtreecommitdiffstats
path: root/default.o.do
blob: 99f9434877df2dea25e7625140c5eeed223bf22e (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
#!/usr/bin/env bash
set -e -o pipefail
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