summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2013-09-29 13:31:32 -0400
committerPaul Smith <psmith@gnu.org>2013-09-30 00:12:18 -0400
commitd0944ee2e8705734c47371f3ec881ce9dae83411 (patch)
tree9ed1236171a9fcf7988ee51b2826aa2ccfd6c838
parent38066b6f19033431052e45861a1671dfb23ea0de (diff)
downloadgunmake-d0944ee2e8705734c47371f3ec881ce9dae83411.tar.gz
Solaris /bin/sh can't handle multiple options ("-e -c").
-rw-r--r--tests/ChangeLog4
-rw-r--r--tests/scripts/targets/ONESHELL8
-rw-r--r--tests/scripts/variables/SHELL12
3 files changed, 21 insertions, 3 deletions
diff --git a/tests/ChangeLog b/tests/ChangeLog
index c785d34..75cf8dc 100644
--- a/tests/ChangeLog
+++ b/tests/ChangeLog
@@ -1,5 +1,9 @@
2013-09-29 Paul Smith <psmith@gnu.org>
+ * scripts/variables/SHELL: Solaris /bin/sh can't handle options in
+ multiple words; skip that test.
+ * scripts/targets/ONESHELL: Ditto.
+
* scripts/variables/GNUMAKEFLAGS: Verify that GNUMAKEFLAGS is
cleared and options are not duplicated.
diff --git a/tests/scripts/targets/ONESHELL b/tests/scripts/targets/ONESHELL
index 0660e92..87713da 100644
--- a/tests/scripts/targets/ONESHELL
+++ b/tests/scripts/targets/ONESHELL
@@ -4,6 +4,10 @@ $description = "Test the behaviour of the .ONESHELL target.";
$details = "";
+# Some shells (*shakes fist at Solaris*) cannot handle multiple flags in
+# separate arguments.
+my $t = `/bin/sh -e -c true 2>/dev/null`;
+my $multi_ok = $? == 0;
# Simple
@@ -19,7 +23,8 @@ all:
# Simple but use multi-word SHELLFLAGS
-run_make_test(q!
+if ($multi_ok) {
+ run_make_test(q!
.ONESHELL:
.SHELLFLAGS = -e -c
all:
@@ -29,6 +34,7 @@ all:
'', 'a=$$
[ 0"$a" -eq "$$" ] || echo fail
');
+}
# Again, but this time with inner prefix chars
diff --git a/tests/scripts/variables/SHELL b/tests/scripts/variables/SHELL
index 4c73890..1d01ba3 100644
--- a/tests/scripts/variables/SHELL
+++ b/tests/scripts/variables/SHELL
@@ -71,12 +71,20 @@ all: ; \@$script
'', $out);
# Do it again but add spaces to SHELLFLAGS
-$flags = '-x -c';
-run_make_test(qq!
+
+# Some shells (*shakes fist at Solaris*) cannot handle multiple flags in
+# separate arguments.
+my $t = `/bin/sh -e -c true 2>/dev/null`;
+my $multi_ok = $? == 0;
+
+if ($multi_ok) {
+ $flags = '-x -c';
+ run_make_test(qq!
.SHELLFLAGS = $flags
all: ; \@$script
!,
'', $out);
+}
# We can't just use "false" because on different systems it provides a
# different exit code--once again Solaris: false exits with 255 not 1