From: Stefano Lattarini Date: Fri, 30 Nov 2012 11:07:51 +0000 (+0100) Subject: tests: we can assume GNU make: related small fixes X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=44e33ef534bc85f1d2abbc5f4dc30ae5894386c5;p=thirdparty%2Fautomake.git tests: we can assume GNU make: related small fixes * t/self-check-shell-no-trail-bslash.sh: Do not explicitly require GNU make. Issue revealed by the maintainer check 'sc_tests_no_gmake_requirement'. * t/ax/shell-no-trail-bslash.in: Remove workaround for BSD make. Improve comments. Signed-off-by: Stefano Lattarini --- diff --git a/t/ax/shell-no-trail-bslash.in b/t/ax/shell-no-trail-bslash.in index 3475398a5..acf833ce3 100644 --- a/t/ax/shell-no-trail-bslash.in +++ b/t/ax/shell-no-trail-bslash.in @@ -31,8 +31,9 @@ am_shell_flags= 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 @@ -49,10 +50,8 @@ while test $# -gt 0; do 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 diff --git a/t/self-check-shell-no-trail-bslash.sh b/t/self-check-shell-no-trail-bslash.sh index cf9c3a6ff..50e962f89 100755 --- a/t/self-check-shell-no-trail-bslash.sh +++ b/t/self-check-shell-no-trail-bslash.sh @@ -17,9 +17,6 @@ # 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