From d461b029213d366e0aab0f305b3f92b8ecd8d2e8 Mon Sep 17 00:00:00 2001 From: Tomasz Kramkowski Date: Wed, 11 Aug 2021 01:25:59 +0100 Subject: 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). --- default.tool.do | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'default.tool.do') 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 <"$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 -- cgit v1.2.3-54-g00ecf