make-w32
[Top][All Lists]
Advanced

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

Re: With SHELL=cmd, make fails to execute bat file paths starting with .


From: Eli Zaretskii
Subject: Re: With SHELL=cmd, make fails to execute bat file paths starting with ../
Date: Wed, 08 May 2013 20:05:05 +0300

> Date: Wed, 8 May 2013 09:49:22 +0200
> From: Erik Carstensen <address@hidden>
> Cc: Duane Campbell <address@hidden>, "address@hidden" <address@hidden>
> 
> SHELL=cmd.exe
> foo:
>     $(MAKE) 'a b'
> 
> will complain that there is no target "a b", while
> 
> SHELL=cmd.exe
> foo:
>     call $(MAKE) 'a b'
> 
> will complain that there is no target "'a".
> 
> However, if I replace $(MAKE) with (cygwin's) touch, then both makefiles
> will create the file "a b".
> 
> So, it seems that the CreateProcess call from make does not correspond
> exactly to the cmd.exe string, but to something very similar which some
> runtimes consider equivalent.

We already talked about this: the problem is not in how we call
CreateProcess, the problem is in the way Make parses the command lines
_before_ it passes them to CreateProcess.  Specifically, when it
short-circuits, it uses quoting rules that support also '..' quoting
(for historical reasons).  By contrast, when it decides to call
cmd.exe, it only uses quoting that is compatible with cmd.exe.

This is something to rectify in the future, but to make this really
correct, Make needs to support arbitrary Windows shells, not just
sh.exe and cmd.exe it supports now.



reply via email to

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