www.delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/12/09/05:57:34

From: batanov AT ascinc DOT com (Alexander Batanov)
Subject: problem with export in GNU make v3.75
9 Dec 1997 05:57:34 -0800 :
Message-ID: <01BD047D.690B8E30.cygnus.gnu-win32@banach.ascinc.com>
Mime-Version: 1.0
To: "'GNU-Win32 AT cygnus DOT com'" <GNU-Win32 AT cygnus DOT com>
Cc: "'batanov AT ascinc DOT com'" <batanov AT ascinc DOT com>

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 AT ascinc DOT 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 AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019