minimal/do: 'redo-ifchange' with no parameters shouldn't try to build all.
It should just build nothing. Because sometimes you want to do something like: redo-ifchange $(find -name '*.c') And the find doesn't return any results. This is consistent with what real redo does. Added a test to confirm that it works.
This commit is contained in:
parent
94c254de77
commit
cfc3f44d64
3 changed files with 5 additions and 6 deletions
|
|
@ -30,6 +30,7 @@ export REDO=$(cd "${dir:-.}" && echo "$PWD/$base")
|
|||
DO_TOP=
|
||||
if [ -z "$DO_BUILT" ]; then
|
||||
DO_TOP=1
|
||||
[ -n "$*" ] || set all # only toplevel redo has a default target
|
||||
export DO_BUILT=$PWD/.do_built
|
||||
: >>"$DO_BUILT"
|
||||
echo "Removing previously built files..." >&2
|
||||
|
|
@ -139,11 +140,7 @@ redo()
|
|||
|
||||
|
||||
set -e
|
||||
if [ -n "$*" ]; then
|
||||
redo "$@"
|
||||
else
|
||||
redo all
|
||||
fi
|
||||
|
||||
if [ -n "$DO_TOP" ]; then
|
||||
echo "Removing stamp files..." >&2
|
||||
|
|
|
|||
2
t/blank/blank.do
Normal file
2
t/blank/blank.do
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
redo-ifchange
|
||||
|
||||
|
|
@ -4,4 +4,4 @@ redo nonshelltest shelltest \
|
|||
deltest deltest2 test.args test2.args passfailtest chdirtest \
|
||||
curse/test deps/test "space dir/test" modetest makedir2 \
|
||||
silencetest touchtest stamp/test alwaystest ifcreate-test \
|
||||
unicode
|
||||
unicode blank/blank
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue