This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
gmake MAKE_MODE problem
- To: <cygwin at cygwin dot com>
- Subject: gmake MAKE_MODE problem
- From: "Erwin Kalvelagen" <erwin dot kalvelagen at verizon dot net>
- Date: Thu, 19 Jul 2001 20:46:08 -0400
- Organization: GAMS Development Corp
- Reply-To: "Erwin Kalvelagen" <erwin at gams dot com>
Hi:
I have a problem with gmake related to the MAKE_MODE environment variable.
We have a large gmake system that is using and relies on MAKE_MODE=UNIX.
A new subsystem calls gmake from this but it wants MAKE_MODE=DOS so
that no backslashes are lost. Basically what we do is:
Makefile:
---------------------------------------------------------------------------
# assume this makefile is called with MAKE_MODE=unix
SHELL=/bin/sh
all:
echo $(MAKE_MODE)
./batch.bat
----------------------------------------------------------------------------
Batch.bat:
----------------------------------------------------------------------------
set MAKE_MODE=dos
gmake -f Makefile2
----------------------------------------------------------------------------
Makefile2:
----------------------------------------------------------------------------
all:
command.com /c echo $(MAKE_MODE)
command.com /c echo c:\windows
----------------------------------------------------------------------------
The output of running gmake shows:
F:\visbuild\problem>gmake
echo unix
unix
./batch.bat
F:\visbuild\problem>
F:\visbuild\problem>set MAKE_MODE=dos
F:\visbuild\problem>gmake -f Makefile2
command.com /c echo dos
dos
command.com /c echo c:\windows
c:windows <-------------------- !!!!!!!!!!!
F:\visbuild\problem>
I.e. although MAKE_MODE is set to DOS the second invocation of gmake
does not treat a backslash properly.
Interestingly if I call BATCH.BAT directly from the command line I get:
F:\visbuild\problem>batch
F:\visbuild\problem>set MAKE_MODE=dos
F:\visbuild\problem>gmake -f Makefile2
command.com /c echo dos
dos
command.com /c echo c:\windows
c:\windows <-------------------- !!!!!!!!!!!
F:\visbuild\problem>
Is there another environment variable that the second invocation inherits
from the first that needs to be reset to make sure that a \ is not considered
as an escape character?
Thanks, Erwin
--
Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple
Bug reporting: http://cygwin.com/bugs.html
Documentation: http://cygwin.com/docs.html
FAQ: http://cygwin.com/faq/