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

Kevin Hill kevin_hill@bigfoot.com
Mon Aug 16 18:44:00 GMT 1999


Dear reader,

I have Cygwin b20.1 (including make version 3.75) and NT4.0 sp4. I am
trying to use make from within the normal cmd.exe of NT, rather than
from within any of the cygwin shells. The problem I have ONLY happens
when I run from cmd.exe; it works find from within sh.

A simple makefile is shown below:

#--Contents of makefile-------------------------------------
all:		_all

_all:
	CmdLineLook -i "BEGIN { $$^W=1; }"
#--------------------------------------------------------

What I expect from this makefile is that my CmdLineLook programme (which
just outputs what it got on the command line and what the value of the
SHELL environment variable is) will receive two parameters, the first
being "-i", the second being "BEGIN ...... }". If I run with Microsoft's
nmake.exe, I get the following output, as expected:

#- NMAKE.EXE output ------------------------------------------------
Microsoft (R) Program Maintenance Utility   Version 6.00.8168.0
Copyright (C) Microsoft Corp 1988-1998. All rights reserved.

        CmdLineLook -i "BEGIN { $^W=1; }"
0       -CmdLineLook-
1       --i-
2       -BEGIN { $^W=1; }-
SHELL=(empty)
#--------------------------------------------------------

If I run GNU make from NT's command prompt, I get the following
unexpected output:

#- GNUMake from cmd.exe output --------------------------------
CmdLineLook -i "BEGIN { $^W=1; }"
0       -CmdLineLook-
1       --i-
2       -BEGIN-
3       -{-
4       -$W=1;-
5       -}-
SHELL=cmd.exe
#--------------------------------------------------------

If I run GNU make within the full Cygwin bash shell, I get the following
expected output:
#- GNUMake from bash output --------------------------------
CmdLineLook -i "BEGIN { $^W=1; }"
0       -CmdLineLook-
1       --i-
2       -BEGIN { $^W=1; }-
SHELL=/bin/sh.exe
#--------------------------------------------------------

Is this a bug within Cygnus' implementation, am I using make in
unexected circumstances or am I doing something stupid. I tried changing
the shell in the makefile to see if I could get the one done from
cmd.exe to work, but it never seemed to affect what shell was actually
being run.

Any answers would be gratefully received.

Kev.
kevin.hill@tab.co.nz
New Zealand Totalisator Agency Board (TAB).

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



More information about the Cygwin mailing list