help-make
[Top][All Lists]
Advanced

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

Re: gnu make question


From: Paul D. Smith
Subject: Re: gnu make question
Date: Tue, 17 Dec 2002 21:19:03 -0500

%% Trey Jackson <address@hidden> writes:

  tj> Is it possible to undefine a make variable?
  tj> Not just set it to an empty string, but actually undefine it?

Not that I can think of.

  tj> | MYVAR = value
  tj> | 
  tj> | ifdef MYVAR
  tj> |   # do something i want
  tj> | endif
  tj> | 
  tj> | 
  tj> | undef MYVAR
  tj> | 
  tj> | ifdef MYVAR
  tj> |   # skip this
  tj> | endif

Since ifdef only tests values to see if they're empty or not, you just
need:

  MYVAR =

in order to "undefine" it enough to placate ifdef.

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