blob: 8a01ecac3041663e68903b74e1190c473199dcdf (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
|
#!/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
# vim:ft=bash
|