help-make
[Top][All Lists]
Advanced

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

Re: Dilemer using target-specific or pattern-specific variables


From: Chen (陈) Jun (军)
Subject: Re: Dilemer using target-specific or pattern-specific variables
Date: Mon, 20 Oct 2008 09:03:02 +0800
User-agent: Thunderbird 2.0.0.17 (Windows/20080914)

Paul Smith wrote:
On Fri, 2008-10-17 at 15:13 +0200, grischka wrote:
  

What about:

	V = a b c $@
	V = c $(V) d
	V = q $(V) r x

etc.?  In order to make this work the way you suggest, you'd have to
store every assignment of every value to every variable, then every time
the value is expanded you'd basically have to walk through the entire
assignment history from the beginning.
  
Yes, Paul, you're quite right, to store every assignment of every value to every variable, and more precisely, if you take my @= symantic, that "store" occurs only when using @= .
And what about co-dependent variables?

	A = a b
	C = d e
	A = $(C) $(A)
	C = q r x $(A) $(C)

etc. etc.?
  
No problem. If you have implemented @= operator, user write this instead:
	A = a b
	C = d e
	A @= $(C) $(A)
	C @= q r x $(A) $(C)

Then the result of A is "d e a b", result of C is "q r x d e a b d e". 
Could you consider this again? It really benefits makefile writers.
I think you are simplifying the problem space WAY too much.
  


reply via email to

[Prev in Thread] Current Thread [Next in Thread]