summaryrefslogtreecommitdiff
path: root/job.c
diff options
context:
space:
mode:
authorEli Zaretskii <eliz@gnu.org>2013-05-01 18:31:53 +0300
committerEli Zaretskii <eliz@gnu.org>2013-05-01 18:31:53 +0300
commit64b9bcaf643fbd4f5510f708e1e22274de54bc09 (patch)
tree73c2333cc1159e493c6ecf85ae57c6a79debb3a5 /job.c
parent650ba5e1c05426901040754f10fdb33605f0dfa6 (diff)
downloadmake-64b9bcaf643fbd4f5510f708e1e22274de54bc09.tar.gz
Fix treatment of whitespace after a backslash on MS-Windows.
job.c (construct_command_argv_internal): Don't treat a backslash as an escape character before whitespace, if the shell is not a Posix shell. For the description of the problem, see http://lists.gnu.org/archive/html/make-w32/2013-04/msg00014.html.
Diffstat (limited to 'job.c')
-rw-r--r--job.c9
1 files changed, 9 insertions, 0 deletions
diff --git a/job.c b/job.c
index 5b626b15..b245007a 100644
--- a/job.c
+++ b/job.c
@@ -3076,6 +3076,15 @@ construct_command_argv_internal (char *line, char **restp, char *shell,
if (ap == new_argv[i])
p = next_token (p + 1) - 1;
}
+#ifdef WINDOWS32
+ /* Backslash before whitespace is not special if our shell
+ is not Unixy. */
+ else if (isspace (p[1]) && !unixy_shell)
+ {
+ *ap++ = *p;
+ break;
+ }
+#endif
else if (p[1] != '\0')
{
#ifdef HAVE_DOS_PATHS