NetBSD-Bugs archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: toolchain/38315: make: ?= should resolve LHS



The following reply was made to PR toolchain/38315; it has been noted by GNATS.

From: David Laight <david%l8s.co.uk@localhost>
To: gnats-bugs%NetBSD.org@localhost
Cc: 
Subject: Re: toolchain/38315: make: ?= should resolve LHS
Date: Mon, 22 Dec 2008 23:01:53 +0000

 On Thu, Mar 27, 2008 at 04:15:04PM +0000, Simon J. Gerraty wrote:
 >  
 >  If I make your test case:
 >  
 >  DOLLAR = $$
 >  LBRACE = {
 >  RBRACE = }
 >  V.$ = FOO
 >  V.$$ = foo
 >  V.$$${LBRACE}DOLLAR${RBRACE} = bar
 >  V.${DOLLAR} ?= baz
 >  
 >  all:
 >          @echo '${V.$$}'
 
 Running that with -r -dv gives:
 
 Global:V. = FOO
 Global:V.$ = foo
 Global:V.${DOLLAR} = bar
 
 and outputs 'FOO' (at least on the versions I've run).
 
 Getting a $ into a variable name is hard work (or rather getting
 such a variable expanded is hard) since make tends to repeatedly
 expand strings.
 
 I'm not sure what happens to V.$, possibly treated as V.${}
 I'm pretty sure ${V.$$} becomes ${V.$} then ${V.}
 
        David
 
 -- 
 David Laight: david%l8s.co.uk@localhost
 


Home | Main Index | Thread Index | Old Index