help-make
[Top][All Lists]
Advanced

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

RE: command-line targets specific variables in 3.74.


From: Paul D. Smith
Subject: RE: command-line targets specific variables in 3.74.
Date: Fri, 23 May 2003 12:59:45 -0400

%% "Thevar, Balakesan P" <address@hidden> writes:

  tbp> I am using 3.74 GNU make. I don't want to upgrade this due to
  tbp> several reason. I need to define new CFLAGS based on my
  tbp> command-line targets ( target specific CFLAGS). How can I do
  tbp> that?. I know that higher versions support this feature. But I
  tbp> want it for this version.

You can't.

You can get a limited version of target-specific variables by using
recursive expansion of variable names, like this:

  foo.o_CFLAGS = -g
  bar.o_CFLAGS = -O2

  CFLAGS = $(address@hidden)

The limitations here compared to real target-specific variables are:

 a) They are not inherited from a top-level target.

 b) They are additive only--you can add new values based on a target but
    you cannot remove existing values.


If this isn't good enough, you'll have to either upgrade to a newer
version of GNU make, or backport the target-specific variables
enhancement to the older version.

-- 
-------------------------------------------------------------------------------
 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]