. test-init.sh
-plan_ 20
+plan_ 60
mkdir kool # Also used later.
if echo nil: | $MAKE -I kool -f -; then
all:
@echo 'Default target $@ should not be called'>&2; exit 1;
k-y:
- @echo ":: $$MAKEFLAGS ::" ;: For debugging.
+ @echo ":: $$MAKEFLAGS :: $$MFLAGS ::" ;: For debugging.
$(am__make_keepgoing)
k-n:
- @echo ":: $$MAKEFLAGS ::" ;: For debugging.
+ @echo ":: $$MAKEFLAGS :: $$MFLAGS ::" ;: For debugging.
$(am__make_keepgoing) && exit 1; exit 0
END
check_make ()
{
- r=ok msg= mode= condition=: directive= reason= skip_reason=
+ msg= mode= condition=: directive= reason= skip_reason=
case $1 in
k-[yn]) mode=$1;;
*) fatal_ "check_run: invalid usage";;
esac
shift
done
- msg=${mode}${msg:+" [$msg]"}
- if $condition; then
- $MAKE "$mode" ${1+"$@"} || r='not ok'
- else
- directive=SKIP reason=$skip_reason
- fi
- result_ "$r" -D "$directive" -r "$reason" "$msg"
- unset r msg mode condition directive reason skip_reason
+ for opts in '' '-s' '-s -r'; do
+ r=ok
+ pmsg=${mode}${msg:+" [$msg]"}${opts:+" ($opts)"}
+ if $condition; then
+ $MAKE $opts "$mode" ${1+"$@"} || r='not ok'
+ else
+ directive=SKIP reason=$skip_reason
+ fi
+ result_ "$r" -D "$directive" -r "$reason" "$pmsg"
+ done
+ unset r msg pmsg opts mode condition directive reason skip_reason
}
# ----------------------------------------------------------------------
# Test against a possible regressions similar to those that affected
# detection of dry mode ("make -n").
check_make k-n TESTS="k.test k2.test"
-check_make k-n TESTS="k1 k k2" AM_MAKEFLAGS="TESTS='k1 k2'"
+check_make k-n TESTS="k1 k2" AM_MAKEFLAGS="TESTS='k1 k2'"
check_make k-n TESTS="k1 k k2" AM_MAKEFLAGS='TESTS="k1 k k2"'
check_make k-n FOOFLAGS="-k -k -nkf2 k -ks --keep -k"
check_make k-n MYFLAGS="-k --keepgoing -k --keep-run -k"