summaryrefslogtreecommitdiff
path: root/read.c
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 /read.c
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 'read.c')
-rw-r--r--read.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/read.c b/read.c
index 591f1f3..1e8d2f3 100644
--- a/read.c
+++ b/read.c
@@ -1958,7 +1958,10 @@ record_files (struct nameseq *filenames, const char *pattern,
/* Check for special targets. Do it here instead of, say, snap_deps()
so that we can immediately use the value. */
if (streq (name, ".POSIX"))
- posix_pedantic = 1;
+ {
+ posix_pedantic = 1;
+ define_variable_cname (".SHELLFLAGS", "-ec", o_default, 0);
+ }
else if (streq (name, ".SECONDEXPANSION"))
second_expansion = 1;