diff options
author | Paul Smith <psmith@gnu.org> | 2010-07-06 06:37:42 +0000 |
---|---|---|
committer | Paul Smith <psmith@gnu.org> | 2010-07-06 06:37:42 +0000 |
commit | 4a000c8c55e7a33d759b349cc14046b75e7040e2 (patch) | |
tree | b3b657564a46ef50c7478480f2659064b7e0d12d /main.c | |
parent | db7b9886e27a33b68aa5e3736d28458e4cd83a50 (diff) | |
download | make-4a000c8c55e7a33d759b349cc14046b75e7040e2.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 'main.c')
-rw-r--r-- | main.c | 21 |
1 files changed, 11 insertions, 10 deletions
@@ -1123,26 +1123,27 @@ main (int argc, char **argv, char **envp) define_variable_cname (".VARIABLES", "", o_default, 0)->special = 1; /* define_variable_cname (".TARGETS", "", o_default, 0)->special = 1; */ define_variable_cname (".RECIPEPREFIX", "", o_default, 0)->special = 1; + define_variable_cname (".SHELLFLAGS", "-c", o_default, 0); /* Set up .FEATURES We must do this in multiple calls because define_variable_cname() is a macro and some compilers (MSVC) don't like conditionals in macros. */ - define_variable_cname (".FEATURES", - "target-specific order-only second-expansion else-if" - " shortest-stem undefine", - o_default, 0); + { + const char *features = "target-specific order-only second-expansion" + " else-if shortest-stem undefine" #ifndef NO_ARCHIVES - do_variable_definition (NILF, ".FEATURES", "archives", - o_default, f_append, 0); + " archives" #endif #ifdef MAKE_JOBSERVER - do_variable_definition (NILF, ".FEATURES", "jobserver", - o_default, f_append, 0); + " jobserver" #endif #ifdef MAKE_SYMLINKS - do_variable_definition (NILF, ".FEATURES", "check-symlink", - o_default, f_append, 0); + " check-symlink" #endif + ; + + define_variable_cname (".FEATURES", features, o_default, 0); + } /* Read in variables from the environment. It is important that this be done before $(MAKE) is figured out so its definitions will not be |