summaryrefslogtreecommitdiff
path: root/job.c
diff options
context:
space:
mode:
authorPaul Smith <psmith@gnu.org>2010-08-29 04:50:26 +0000
committerPaul Smith <psmith@gnu.org>2010-08-29 04:50:26 +0000
commit1d3c4a9ac45b84e4468988a5d456741e15188cc0 (patch)
tree021cc745b684823211ceb4e143e6eb3eb9b3a276 /job.c
parent418325808cd6cdc2c2a7296c0f76a98a12ea7af5 (diff)
downloadmake-1d3c4a9ac45b84e4468988a5d456741e15188cc0.tar.gz
Set shellflags to a reasonable default if it's not set already.
Diffstat (limited to 'job.c')
-rw-r--r--job.c6
1 files changed, 5 insertions, 1 deletions
diff --git a/job.c b/job.c
index aacfb844..eab91a1b 100644
--- 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)