cvs commit: src/usr.bin/make cond.c

Ruslan Ermilov ru at FreeBSD.org
Sun Sep 7 05:46:04 PDT 2003


On Sun, Sep 07, 2003 at 05:30:10AM -0600, M. Warner Losh wrote:
> In message: <20030907104614.GC10526 at sunbay.com>
>             Ruslan Ermilov <ru at FreeBSD.org> writes:
> : On Sat, Sep 06, 2003 at 07:16:10PM -0700, Warner Losh wrote:
> : > imp         2003/09/06 19:16:10 PDT
> : > 
> : >   FreeBSD src repository
> : > 
> : >   Modified files:
> : >     usr.bin/make         cond.c 
> : >   Log:
> : >   Keep up with minor changes to NetBSD.  Consider a variable empty when
> : >   not define.
> : >   
> : >   Obtained From: NetBSD (rev 1.18; sjg)
> : >   
> : >   Revision  Changes    Path
> : >   1.27      +1 -1      src/usr.bin/make/cond.c
> : > 
> : Does it mean that ``.if empty(FOO)'' will not cause an error
> : now when FOO is not defined?  If so, what is the motivation
> : for this change?
> 
> The NetBSD folks needed it for something, I'm not sure what.  Since it
> was easy, didn't brea anything and cross BSD make divergence has been
> a problem in the past, I went ahead and added it.
> 
This change is in NetBSD for only 29 hours, the reasoning is
not well understood, and our make(1)'s are so much different
that I don't really think this particular one makes them
really closer.  It also seems counter-intuitive to me --
undefined variable doesn't have _any_ value, so we cannot
say if it's empty or not.

Like in SQL there's a special "IS NULL" operator to test if
a value is null, I want we continue to treat undefined make
variables specially, with the existing defined() function,
unless there is a good reason not to.  Sorry, but the above
explanation does not sound like this.  Could you please dig
up what is the real reasoning behind the change?  If the only
reason is to ease writing constructs like

	.if defined(FOO) && !empty(FOO)
	...

which are common, then I'm strongly against it, FWIW.


Cheers,
-- 
Ruslan Ermilov		Sysadmin and DBA,
ru at sunbay.com		Sunbay Software Ltd,
ru at FreeBSD.org		FreeBSD committer
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 187 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/cvs-src/attachments/20030907/09573087/attachment.bin


More information about the cvs-src mailing list