am_shell_command=; unset am_shell_command
while test $# -gt 0; do
case $1 in
- # If the shell is invoked by make e.g. as "sh -ec" (seen on
- # GNU make in POSIX mode) or "sh -ce" (seen on Solaris make).
+ # The shell might be invoked by make e.g. as "sh -ec" or "sh -ce".
+ # Be liberal (in the spirit of defensive programming) and accept
+ # both forms.
-*c*)
am_flg=$(printf '%s\n' "$1" | sed -e 's/^-//' -e 's/c//g')
if test x"$am_flg" != x; then
done
if test x${am_shell_command+"set"} != x"set"; then
- # Some make implementations, like *BSD's, pass the recipes to the shell
- # through its standard input. Trying to run our extra checks in this
- # case would be too tricky, so we just skip them.
- exec $am_SHELL $am_shell_flags ${1+"$@"}
+ echo "$0: fatal: no shell command given through the '-c' option" >&2
+ exit 1
fi
case $am_shell_command in
# Check that our fake "shell" used to guard against use of trailing
# backslashes in recipes actually complains when those are used.
-# Our hack doesn't work with some make implementations (see comments
-# in 't/ax/shell-no-trail-bslash.in' for more details).
-required=GNUmake
am_create_testdir=empty
. test-init.sh