Subject: problem with export in GNU make v3.75
From: [email-masked] (Alexander Batanov)

9 Dec 1997 05:57:34 -0800
Message-ID: <[email-masked]>
Mime-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 8bit
To: "[email-masked]'" <[email-masked]>
Cc: "[email-masked]'" <[email-masked]>

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
[email-masked]

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

-
For help on using this list (especially unsubscribing), send a message to
"[email-masked]" with one line of text: "help".