help-make
[Top][All Lists]
Advanced

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

Re: how to conditionaly set a variable depending on final target?


From: Paul D. Smith
Subject: Re: how to conditionaly set a variable depending on final target?
Date: Mon, 13 Jan 2003 21:58:48 -0500

%% "shh" <address@hidden> writes:

  s> i want to set a variable depending on the value of final target, as
  s> follows. on command line,

  s>     make -f mf.mak t01

  s> in make file,
  s>     ifeq ($(final_targetname), t01)
  s>             ^^^^^^^^^^^^^^^^^^^^
  s>     VAR = T_01
  s>     else
  s>     VAR = T02
  s>     endif

Please always specify what version of GNU make you're using, and what
operating system you're running on.


If you're using GNU make 3.76 or above, look up the MAKECMDGOALS
variable in the GNU make manual.  If you're using something older than
3.76, upgrade.

HTH...

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