[Top][All Lists]

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

Re: target-specific 'define'd variables (3.80)?

From: Paul D. Smith
Subject: Re: target-specific 'define'd variables (3.80)?
Date: Tue, 6 Jul 2004 16:01:40 -0400

%% Boris Kolpackov <address@hidden> writes:

  bk> Paul D. Smith <address@hidden> writes:
  >> I don't see any reason technically that it couldn't be done.

  bk> That's what I thought too. Also it would be nice to extend the concept
  bk> of target/pattern-specificity to other parts of make, e.g.:

  bk> /foo/bar: vpath %.so /usr/lib64  # target-specific vpath

Hm.  This one might be reasonably feasible.

  bk> foo := $(/foo/bar: foo)          # query target-specific variable

  bk> ifdef /foo/bar: foo              # target-specific variable in ifdef
  bk> ebdif

These two would be more difficult, obviously.

It's not really clear to me when it's that useful to query, at a
_GLOBAL_ scope like this, what target-specific variables are set for a
given target.  Remember that these queries will be evaluated at makefile
read-in time, not runtime, so much of the information is potentially not
even available yet.

Not only that, but make can't even _know_ what the full set of
target-specific variables are for a given target until that target is
actually ready to be invoked... the scope of target-specific variables
could depend on the target->prerequisite path make used to get to this
target and decide to build it.

 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://make.paulandlesley.org
 "Please remain calm...I may be mad, but I am a professional." --Mad Scientist

reply via email to

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