Make quoted strings problem running from cmd.exe...

Kevin Hill kevin_hill@bigfoot.com
Tue Aug 17 14:03:00 GMT 1999


Earnie, Tadeusz and others,

Whilst, once again, I understand what you are saying, I still believe
there is something mucky going on under the hood of make. Both examples
below are using make from Cmd.exe, but setting the shell to my
CmdLineLook programme. The first shows a command with no quotes in it.
It tidily invokes the shell, with a /c, followed by one parameter for
the entire command line to be executed. The second, for a command with
quotes in it, deviates completely from this pattern and separates up the
command into apparently random units.

My problem now is not "is this a bug or strange feature in make.exe?",
but more one of "how can I fix this so I can move on and get on with my
project?". There is no mention of what affect quotes have on a make
command in the official GNU Make documentation. Does anyone have a
feeling for what is happening, and how I can solve the issue. I guess I
could write my own shell, in place of cmd.exe, but that is a little
over-the-top. I have tried doing makes within the full cygwin
environment, from sh.exe, but then get into issues of invoking
ActiveState perl from sh.exe, which I have tried but not succeeded at.

# Invoke of shell for the command as follows: CmdLineLook -i BEGIN {
$^W=1; }
0       -F:/GAP/NEWDEV/GAP/TESTING/TEST1/LATEST/ANOTHER/CmdLineLook.exe-
1       -/c-
2       -CmdLineLook -i BEGIN { $^W=1; }-
#
-------------------------------------------------------------------------

# Invoke of shell for the command as follows: CmdLineLook -i "BEGIN {
$^W=1; }"
0       -F:/GAP/NEWDEV/GAP/TESTING/TEST1/LATEST/ANOTHER/CmdLineLook.exe-
1       -/c-
2       -CmdLineLook -i "BEGIN-
3       -{-
4       -$^W=1;-
5       -}"-
#
-------------------------------------------------------------------------

Please, if anyone can help out here, I would be most appreciative.

Regards,

Kev.
kevin.hill@tab.co.nz


     ---------------------------------
     Subject:
     Re: Re[2]: Make quoted strings problem running from cmd.exe...
     ---------------------------------
     


     Tadeusz is correct.  Nmake must be quoting the quotes before
passing it
     to your program.  GNUMake doesn't do that so your program doesn't
see the
     quotes.

     Sorry, unless you quote the quotes or stick with the shells
provided by the
     cygwin product then you ain't goin' a get what you expect. 
However, the
     code
     is available for you to change as you see fit.

     Earnie.

--
Want to unsubscribe from this list?
Send a message to cygwin-unsubscribe@sourceware.cygnus.com



More information about the Cygwin mailing list