summaryrefslogtreecommitdiff
path: root/tests/scripts/variables/SHELL
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2010-07-06 06:37:42 +0000
committerPaul Smith <psmith@gnu.org>2010-07-06 06:37:42 +0000
commitc7b469f0f337247acb83067d8f4aa4dc76b8a9a9 (patch)
treeb3b657564a46ef50c7478480f2659064b7e0d12d /tests/scripts/variables/SHELL
parentc78b7265bd1ee374a5e515d79448d0e3452b5ede (diff)
downloadgunmake-c7b469f0f337247acb83067d8f4aa4dc76b8a9a9.tar.gz
- Enhance .POSIX to set -e when invoking shells, as demanded by a
backward-incompatible change in the 2008 POSIX specification. - Add the .SHELLFLAGS variable so people can choose their own shell flags. - Add tests for this. - Add documentation for this.
Diffstat (limited to 'tests/scripts/variables/SHELL')
-rw-r--r--tests/scripts/variables/SHELL14
1 files changed, 14 insertions, 0 deletions
diff --git a/tests/scripts/variables/SHELL b/tests/scripts/variables/SHELL
index a303540..69871d2 100644
--- a/tests/scripts/variables/SHELL
+++ b/tests/scripts/variables/SHELL
@@ -56,4 +56,18 @@ two: export SHELL := /./$mshell\n".'
one two:;@echo "$@: $(SHELL) $$SHELL"
', '', "two: /./$mshell /./$mshell\none: /././$mshell $mshell\n");
+# Test .SHELLFLAGS
+
+run_make_test(q!
+.SHELLFLAGS = -xc
+all: ; @true
+!,
+ '', "+ true\n");
+
+run_make_test(q!
+.SHELLFLAGS = -xec
+all: ; @true; false; true
+!,
+ '', "+ true\n+ false\n#MAKE#: *** [all] Error 1\n", 512);
+
1;