help-make
[Top][All Lists]
Advanced

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

RE: $(if) feature in make 3.80?


From: Paul D. Smith
Subject: RE: $(if) feature in make 3.80?
Date: Fri, 6 Apr 2001 15:57:52 -0400

I would like to see some kind of boolean logic added to GNU make, but
the problem is deciding exactly how it should work.

For example, currently make uses "empty string is false, non-empty
string is true" for boolean logic.

In your implementation you use the hardcoded value "1" for true; my
opinion is that we should implement the and, or, and not operator
behavior from Lisp.

The next question becomes, are these operators short-circuiting, like
the Lisp ones, or not?  The answer to this may have some impact on, say,
how they are used in $(call ...) user defined functions which already
don't work with $(if ...).

After you get past that, then you have to think about the make
preprocessor operations; right now we have ifeq and ifneq (and ifdef and
ifndef, but these are not relevant for our purposes)--should we add a
simple "if (<condition>)", or just leave people to write out
"ifneq (,<condition>)"?

Etc...

-- 
-------------------------------------------------------------------------------
 Paul D. Smith <address@hidden>          Find some GNU make tips at:
 http://www.gnu.org                      http://www.paulandlesley.org/gmake/
 "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]