Bug: make fails to execute .BAT files with space in the path, with SHELL=cmd.exe
Erik Carstensen <[email protected]> Sat, 27 Apr 2013 21:48:54 +0200
| Newsgroups | gmane.comp.gnu.make.windows |
|---|---|
| Message-ID | <CALeBojTxd-3pfr-1cX0m6edDm70Qsjrn_s30+iQvpuJqDhSX1A@mail.gmail.com> |
Hi,
I have the following makefile:
SHELL=cmd.exe
default:
"a b.bat" xy
"a b.bat" "x y"
a\ b.bat xy
a\ b.bat x\ y
I also have a file 'a b.bat', which contains a single line:
echo a b
Now when I run make, this happens:
/tmp$ /cygdrive/c/mingw64-i686-20110207/bin/make.exe
"a b.bat" xy
a b
"a b.bat" "x y"
a b
a\ b.bat xy
C:\cygwin\tmp>echo a b
a b
a\ b.bat x\ y
'a' is not recognized as an internal or external command,
operable program or batch file.
make: *** [default] Error 1
I think the problem is in the lpCommandLine parameter to CreateProcess,
where argv[0] needs cmd.exe-style quoting of spaces if it is a .BAT file
make --version
GNU Make 3.82
Built for x86_64-w64-mingw32
[...]
_______________________________________________
Make-w32 mailing list
[email protected]
https://lists.gnu.org/mailman/listinfo/make-w32