help-make
[Top][All Lists]
Advanced

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

Re: MAKE_RESTARTS design question


From: Paul D. Smith
Subject: Re: MAKE_RESTARTS design question
Date: Tue, 1 Aug 2006 17:48:14 -0400

%% "Frink, Alexander " <address@hidden> writes:

  fa> Why is MAKE_RESTARTS designed as is, i.e. empty before the first
  fa> restart, then 1, 2, ...?  Wouldn't it be better to set it to 0 for
  fa> the first iteration?  Then it would not be necessary to resort on
  fa> the literal check on the version number to test if it is available
  fa> at all.

I dunno; it never occurred to me.  In GNU make variables, an empty
variable false, while a variable with any value (even "0") is true.
It's not easy to do math in GNU make.  I guess I was anticipating people
would be more likely to do something like:

    ifdef MAKE_RESTARTS
        ... do something different if we've restarted ...
    endif

Of course you could almost as easily use:

    ifeq ($(MAKE_RESTARTS),0)
        ... do something different if we've restarted ...
    endif

to get the same effect if your suggestion were followed.

It's just the way it was done...

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