]> git.ipfire.org Git - thirdparty/make.git/commitdiff
Set shellflags to a reasonable default if it's not set already.
authorPaul Smith <psmith@gnu.org>
Sun, 29 Aug 2010 04:50:26 +0000 (04:50 +0000)
committerPaul Smith <psmith@gnu.org>
Sun, 29 Aug 2010 04:50:26 +0000 (04:50 +0000)
ChangeLog
job.c

index 392b06af71e2acbe2be6d5cd9a2b5e02d564cadb..233be1a32e5da7726487eecffb3b14e9f3a8b0ad 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2010-08-29  Paul Smith  <psmith@gnu.org>
+
+       * job.c (construct_command_argv_internal): If shellflags is not
+       set, choose an appropriate default value.  Fixes Savannah bug #30748.
+
 2010-08-27  Eli Zaretskii  <eliz@gnu.org>
 
        * variable.c (define_automatic_variables) [__MSDOS__ || WINDOWS32]:
diff --git a/job.c b/job.c
index aacfb844aac19774a7579803d8887259ea994f5a..eab91a1babc90e478f13cd204b53817b0bbdbd95 100644 (file)
--- a/job.c
+++ b/job.c
@@ -2434,6 +2434,9 @@ construct_command_argv_internal (char *line, char **restp, char *shell,
   if (*line == '\0')
     return 0;
 
+  if (shellflags == 0)
+    shellflags = posix_pedantic ? "-ec" : "-c";
+
   /* See if it is safe to parse commands internally.  */
   if (shell == 0)
     shell = default_shell;
@@ -2977,7 +2980,8 @@ construct_command_argv_internal (char *line, char **restp, char *shell,
 #endif /* WINDOWS32 */
 
     if (unixy_shell)
-      new_argv = construct_command_argv_internal (new_line, 0, 0, 0, 0, flags, 0);
+      new_argv = construct_command_argv_internal (new_line, 0, 0, 0, 0,
+                                                  flags, 0);
 
 #ifdef __EMX__
     else if (!unixy_shell)