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.
$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
# Simple but use multi-word SHELLFLAGS
-run_make_test(q!
+if ($multi_ok) {
+ run_make_test(q!
.ONESHELL:
.SHELLFLAGS = -e -c
all:
'', 'a=$$
[ 0"$a" -eq "$$" ] || echo fail
');
+}
# Again, but this time with inner prefix chars
'', $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