make-w32
[Top][All Lists]
Advanced

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

Re: mingw make problem


From: William A. Hoffman
Subject: Re: mingw make problem
Date: Fri, 18 Aug 2006 16:53:38 -0400

At 04:32 PM 8/18/2006, Eli Zaretskii wrote:
>> Date: Fri, 18 Aug 2006 15:50:03 -0400
>> From: "William A. Hoffman" <address@hidden>
>> Cc: address@hidden
>> 
>> >all:
>> >        d:/full/path/to/rundump.exe  "a.c" "b.c"
>> >
>> >d:/full/path/to/rundump.exe  "a.c" "b.c"
>> >command line = {d:\full\path\to\rundump.exe a.c b.c}
>> >argv[0] = {d:\full\path\to\rundump.exe}
>> >argv[1] = {a.c}
>> >argv[2] = {b.c}
>> >
>> >So the MinGW binary of Make does not remove the outer layer of quotes,
>> >and the subsidiary program sees 2 separate arguments.
>> 
>> // from cygwin:
>> $ ./make.exe -f mk runit
>> c:/hoffman/My\ Builds/CMakeDev/Tests/COnly/b/run.exe "a.c" "b.c"
>> command line = {"c:\hoffman\My Builds\CMakeDev\Tests\COnly\b\run.exe" "a.c 
>> b.c"}
>> 
>> argv[0] = {c:\hoffman\My Builds\CMakeDev\Tests\COnly\b\run.exe}
>> argv[1] = {a.c b.c}
>
>Looks like the shell did something to the arguments.  What other
>explanation can there be?

I have new information:


$ ./make.exe -f mk runit
"c:/hoffman/My Builds/CMakeDev/Tests/COnly/b/run.exe" "a.c" "b.c"
command line = {"c:\hoffman\My Builds\CMakeDev\Tests\COnly\b\run.exe" a.c b.c}
argv[0] = {c:\hoffman\My Builds\CMakeDev\Tests\COnly\b\run.exe}
argv[1] = {a.c}
argv[2] = {b.c}

address@hidden ~/My Builds/CMakeDev/Tests/COnly/b
$ ./make.exe -f mk runit2
c:/hoffman/My\ Builds/CMakeDev/Tests/COnly/b/run.exe "a.c" "b.c"
command line = {"c:\hoffman\My Builds\CMakeDev\Tests\COnly\b\run.exe" "a.c b.c"}

argv[0] = {c:\hoffman\My Builds\CMakeDev\Tests\COnly\b\run.exe}
argv[1] = {a.c b.c}

makefile:
runit:
        "c:/hoffman/My Builds/CMakeDev/Tests/COnly/b/run.exe" "a.c" "b.c"
runit2:
        c:/hoffman/My\ Builds/CMakeDev/Tests/COnly/b/run.exe "a.c" "b.c"

So, if the run command is quoted and the args are quoted it works.
If the run command is full path but not quoted it fails.

Although, that does not explain why this does not work:

broken:
        c:/cygwin/bin/gcc.exe  "a.c" "b.c"


????

-Bill






reply via email to

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