Consider following usecase:
all.do:
redo-ifchange downloaded.file
downloaded.file.do:
redo-ifchange downloaded.file.sha256
wget
http://upstream.server/"$1" -O "$3"
downloaded.file.sha256.do:
redo-ifchange
stamp.every-hour.do wget
http://upstream.server/"$1" -O "$3"
redo-stamp <"$3"
stamp.every.hour.do:
redo-always
date +"%F %H" > "$3"
redo-stamp <"$3"
Actual behaviour:
downloaded.file.sha256 is downloaded at most once in a hour (this works)
downloaded.file is downloaded every time downloaded.file.sha256 is downloaded
Expected behaviour:
downloaded.file is downloaded only if downloaded.file.sha256 contents is changed
Generaly speaking: T->A->B(stamp)->C(stamp)
"A" is rebuild whenever content of "C" is changed, even if content of "B" is not changed by rebuild. Expected behaviour is that "C" changed invokes rebuild of "B", but if result of "B" does not change, then "A" is not rebuilt.