delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1999/01/22/14:57:50

From: khan AT xraylith DOT wisc DOT edu (Mumit Khan)
Subject: Re: How to echo out shell var inside make in B20
22 Jan 1999 14:57:50 -0800 :
Message-ID: <199901221627.KAA27639.cygnus.gnu-win32@modi.xraylith.wisc.edu>
References: <918C79AB552BD211A2BD00805F15CE853FF54F AT x-crt-es-ms1 DOT cp10 DOT es DOT xerox DOT com>
To: "Truong, Ton H" <ttruong AT cp10 DOT es DOT xerox DOT com>
Cc: "'gnu-win32 AT cygnus DOT com'" <gnu-win32 AT cygnus DOT com>

"Truong, Ton H" <ttruong AT cp10 DOT es DOT xerox DOT com> writes:
> 
> I just downloaded the B20.1 version and run into this problem which we did
> not have using B18.
> 
> Our makefile defines this variable
> LIB=ttdr
> 
> Say I have this target:
> unittestdebug:
>      echo $$LIB
> 
> With the double dollar sign, I would expect the echo command to echo out the
> VC++ LIB environment variable (c:/msdev/VC/lib; etc...), but it echoes out
> the value "ttdr" - the Makefile variable instead.
> 

You misunderstand how make variable overrides work, and it's quite
understandable since it may seem counter intuitive unless you're used 
to it. See the documentation on using environment variables and so on. 
An easy workaround for your problem is the following:
  
  $ make -e 

or,
  
  $ make --environment-overrides

and it should echo the expected output.

Regards,
Mumit

-
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