[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Automake-NG] [FYI] tests: we can assume GNU make: related small fixes
From: |
Stefano Lattarini |
Subject: |
[Automake-NG] [FYI] tests: we can assume GNU make: related small fixes |
Date: |
Fri, 30 Nov 2012 12:13:51 +0100 |
* 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 <address@hidden>
---
t/ax/shell-no-trail-bslash.in | 11 +++++------
t/self-check-shell-no-trail-bslash.sh | 3 ---
2 files changed, 5 insertions(+), 9 deletions(-)
diff --git a/t/ax/shell-no-trail-bslash.in b/t/ax/shell-no-trail-bslash.in
index 3475398..acf833c 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 cf9c3a6..50e962f 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
--
1.8.0.1.240.ge8a1f5a
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Automake-NG] [FYI] tests: we can assume GNU make: related small fixes,
Stefano Lattarini <=