problem with export in GNU make v3.75

Alexander Batanov batanov@ascinc.com
Tue Dec 9 05:36:00 GMT 1997


Dear all,

I have a problem with exporting variables in makefile using GNU make v3.75 distributed in Cygnus's gnu-win32-b18 package. It simply does not work. Here is an example with the top-level makefile calling make on subordinate makefile:

file: Makefile:
-------------------
MYVAR=alex
export MYVAR

trg1:
	echo MAKELEVEL is $(MAKELEVEL)
	echo MYVAR is $(MYVAR)
	$(MAKE) -f Makefile.sub
	echo MAKELEVEL is $(MAKELEVEL)
	echo MYVAR is $(MYVAR)

file: Makefile.sub:
-------------------------
trg1:
	echo MAKELEVEL is $(MAKELEVEL)
	echo MYVAR is $(MYVAR)

output of make -f Makefile:
--------------------------------------
bash$ make
echo MAKELEVEL is 0
MAKELEVEL is 0
echo MYVAR is alex
MYVAR is alex
make -f Makefile.sub
echo MAKELEVEL is 0
MAKELEVEL is 0
echo MYVAR is
MYVAR is
echo MAKELEVEL is 0
MAKELEVEL is 0
echo MYVAR is alex
MYVAR is alex

Note that MAKELEVEL environment variable does not work as advertised either.

I tried running GNU make v3.73 obtained from elsewhere on the net, and it worked fine!

Any ideas how to overcome this problem?

Thanks,

Alex Batanov
Software Engineer
Alternative System Concepts, Inc.
22 Haverhill Rd
Windham, NH 03087-0128
(603) 437-2234
(603) 437-2722 fax
batanov@ascinc.com

P.S. Please cc your responses to my email address.  


-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request@cygnus.com" with one line of text: "help".



More information about the Cygwin mailing list