make-w32
[Top][All Lists]
Advanced

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

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


From: Erik Carstensen
Subject: Bug: make fails to execute .BAT files with space in the path, with SHELL=cmd.exe
Date: Sat, 27 Apr 2013 21:48:54 +0200

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
[...]

reply via email to

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