Add a redo-always command: it adds an "always dirty" dependency to your target.
This is mostly useless except when combined with redo-stamp... I think.
This commit is contained in:
parent
1d26d99e0c
commit
0da5c7c082
10 changed files with 45 additions and 7 deletions
2
t/.gitignore
vendored
2
t/.gitignore
vendored
|
|
@ -16,3 +16,5 @@ test2.args
|
|||
/touch1
|
||||
/touch1.do
|
||||
/deltest2
|
||||
/always1
|
||||
/always1.log
|
||||
|
|
|
|||
3
t/always1.do
Normal file
3
t/always1.do
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
echo $$ >>always1.log
|
||||
echo $$
|
||||
redo-always
|
||||
13
t/alwaystest.do
Normal file
13
t/alwaystest.do
Normal file
|
|
@ -0,0 +1,13 @@
|
|||
rm -f always1 always1.log
|
||||
|
||||
redo always1
|
||||
[ "$(wc -l <always1.log)" -eq 1 ] || exit 11
|
||||
|
||||
# This shouldn't rebuild, but because other people might be running flush-cache.sh
|
||||
# in parallel with us, we can't be 100% sure it won't. So don't test it.
|
||||
#redo-ifchange always1
|
||||
#[ "$(wc -l <always1.log)" -eq 1 ] || exit 21
|
||||
|
||||
./flush-cache.sh
|
||||
redo-ifchange always1
|
||||
[ "$(wc -l <always1.log)" -eq 2 ] || exit 31
|
||||
|
|
@ -1,5 +1,5 @@
|
|||
redo example/clean curse/clean deps/clean "space dir/clean" stamp/clean
|
||||
rm -f c c.c c.c.c c.c.c.b c.c.c.b.b d mode1 makedir.log chdir1 deltest2 \
|
||||
hello [by]ellow *.o *~ .*~ CC LD passfail silence silence.do \
|
||||
touch1 touch1.do
|
||||
hello [by]ellow *.o *~ .*~ *.log CC LD passfail silence silence.do \
|
||||
touch1 touch1.do always1
|
||||
rm -rf makedir
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@ redo stampy
|
|||
|
||||
# stampy already exists, so we won't generate it a second time, even though
|
||||
# usestamp depends on it.
|
||||
../flush-cache.sh
|
||||
redo-ifchange usestamp
|
||||
[ "$(wc -l <stampy.log)" -eq 1 ] || exit 21
|
||||
[ "$(wc -l <usestamp.log)" -eq 1 ] || exit 12
|
||||
|
|
@ -17,6 +18,7 @@ redo stampy
|
|||
[ "$(wc -l <usestamp.log)" -eq 1 ] || exit 32
|
||||
|
||||
# same as above: stampy is already up-to-date, so it won't be redone.
|
||||
../flush-cache.sh
|
||||
redo-ifchange usestamp
|
||||
[ "$(wc -l <stampy.log)" -eq 2 ] || exit 41
|
||||
[ "$(wc -l <usestamp.log)" -eq 1 ] || exit 42
|
||||
|
|
|
|||
|
|
@ -2,4 +2,4 @@ redo-ifchange all
|
|||
./hello >&2
|
||||
redo deltest deltest2 test.args test2.args passfailtest chdirtest \
|
||||
curse/test deps/test "space dir/test" modetest makedir2 \
|
||||
silencetest touchtest stamp/test
|
||||
silencetest touchtest stamp/test alwaystest
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue