diff options
author | Tomasz Kramkowski <tk@the-tk.com> | 2021-08-11 01:25:59 +0100 |
---|---|---|
committer | Tomasz Kramkowski <tk@the-tk.com> | 2021-08-11 01:29:23 +0100 |
commit | d461b029213d366e0aab0f305b3f92b8ecd8d2e8 (patch) | |
tree | 396651ae8fb4db6ead0d9cc303c6559ff9353662 | |
parent | 22f571e3f00e9e66821b67f41ed764b474a98884 (diff) | |
download | pack-d461b029213d366e0aab0f305b3f92b8ecd8d2e8.tar.gz pack-d461b029213d366e0aab0f305b3f92b8ecd8d2e8.tar.xz pack-d461b029213d366e0aab0f305b3f92b8ecd8d2e8.zip |
make [HT]CC full paths for redo-ifchange in .tool
This should force rebuilding targets which depend on tools which have
changed in the filesystem and prevent envrionment changes from causing
build changes. But this should be documented.
Ideally a redo with a redo-always (or more aptly named redo-ifredo)
would mark an env target as needing redoing every time you run redo on a
deptree which includes it and this would in turn cause rebuilding of
things which rely on the environment (like tools which run from the
path).
-rwxr-xr-x | .vars.rc.do | 2 | ||||
-rwxr-xr-x | default.tool.do | 6 |
2 files changed, 7 insertions, 1 deletions
diff --git a/.vars.rc.do b/.vars.rc.do index 3e0d1a1..3a5d26d 100755 --- a/.vars.rc.do +++ b/.vars.rc.do @@ -63,7 +63,9 @@ if [[ $werror ]]; then fi if [[ ! $TCC ]]; then TCC=$CC; fi +TCC=$(command -v "$TCC") if [[ ! $HCC ]]; then HCC=$CC; fi +HCC=$(command -v "$HCC") for p in T H; do for v in CFLAGS CPPFLAGS LDFLAGS LDLIBS; do eval "$p$v+=(\"\${$v[@]}\")" diff --git a/default.tool.do b/default.tool.do index 717d3e2..21c9b12 100755 --- a/default.tool.do +++ b/default.tool.do @@ -22,6 +22,10 @@ link-*) *) echo "Invalid tool name $1" >&2; exit 1 ;; esac -printf '#generated by %s %s\ncmd=(%s)\n' "${0##*/}" "$tool" "$cmd" >"$3" +cat <<EOF >"$3" +#generated by ${0##*/} $tool +cmd=($cmd) +redo-ifchange "\${cmd[0]}" +EOF if command -v redo-stamp &>/dev/null; then redo-stamp <"$3"; fi # vim:ft=bash |