I think this aligns better with how redo works. Otherwise, if a.do creates a as a symlink, then changes to the symlink's *target* will change a's stat/stamp information without re-running a.do, which looks to redo like you modified a by hand, which causes it to stop running a.do altogether. With this change, modifications to a's target are okay, but they don't trigger any redo dependency changes. If you want that, then a.do should redo-ifchange on its symlink target explicitly.
14 lines
486 B
Text
14 lines
486 B
Text
rm -f this-doesnt-exist
|
|
! redo this-doesnt-exist >&/dev/null || exit 32 # expected to fail
|
|
! redo-ifchange this-doesnt-exist >&/dev/null || exit 33 # expected to fail
|
|
redo-ifcreate this-doesnt-exist >&/dev/null || exit 34 # expected to pass
|
|
|
|
|
|
|
|
rm -f fail
|
|
! redo-ifchange fail >&/dev/null || exit 44 # expected to fail
|
|
|
|
touch fail
|
|
../flush-cache
|
|
# since we created this file by hand, fail.do won't run, so it won't fail.
|
|
redo-ifchange fail >&/dev/null || exit 55 # expected to pass
|