make-w32
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Bug: make fails to execute .BAT files with space in the path, with S


From: Eli Zaretskii
Subject: Re: Bug: make fails to execute .BAT files with space in the path, with SHELL=cmd.exe
Date: Wed, 01 May 2013 18:39:10 +0300

> Date: Tue, 30 Apr 2013 19:48:12 +0300
> From: Eli Zaretskii <address@hidden>
> Cc: address@hidden
> 
> > Date: Tue, 30 Apr 2013 11:23:41 +0200
> > From: Erik Carstensen <address@hidden>
> > 
> > > Alas, this won't help you for long, because the next release of Make
> > >  will not invoke cmd.exe just because the command line has quotes.
> > > Such commands are also short-circuited in the development sources.
> > >
> > 
> > Oh. This seems to change make behaviour in a non-backward-compatible way
> > when one argument has a trailing backslash.
> 
> I will look into this.  I don't remember whether this is on purpose.

It is a side effect of the change that removed the double quote " from
the list of special characters for the Windows shells.  (The reason
for that was to avoid hitting the command-line length limitations of
the Windows shells, which are 4KB or 8KB, depending on the Windows
version, while the limit imposed by the OS is 32KB.)

So now commands that use quotes go through the fast path, instead of
being submitted to cmd.exe via a batch file, which exposed these
commands to this (very old) bug.

I fixed that in the repository; the patch is below if you want to try
it.

Please also tell me if your original problem was fixed by the patches
I sent earlier.  Thanks.


--- job.c~3     2013-04-29 08:25:48.616354500 +0300
+++ job.c       2013-05-01 12:05:57.502319100 +0300
@@ -3072,6 +3072,15 @@ construct_command_argv_internal (char *l
                 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



reply via email to

[Prev in Thread] Current Thread [Next in Thread]