Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 7 Sep 2003 15:45:33 +0300
From:      Ruslan Ermilov <ru@FreeBSD.org>
To:        "M. Warner Losh" <imp@bsdimp.com>
Cc:        cvs-all@FreeBSD.org
Subject:   Re: cvs commit: src/usr.bin/make cond.c
Message-ID:  <20030907124533.GA21121@sunbay.com>
In-Reply-To: <20030907.053010.130739333.imp@bsdimp.com>
References:  <200309070216.h872GBh2098385@repoman.freebsd.org> <20030907104614.GC10526@sunbay.com> <20030907.053010.130739333.imp@bsdimp.com>

next in thread | previous in thread | raw e-mail | index | archive | help

--82I3+IH0IqGh5yIs
Content-Type: text/plain; charset=us-ascii
Content-Disposition: inline
Content-Transfer-Encoding: quoted-printable

On Sun, Sep 07, 2003 at 05:30:10AM -0600, M. Warner Losh wrote:
> In message: <20030907104614.GC10526@sunbay.com>
>             Ruslan Ermilov <ru@FreeBSD.org> writes:
> : On Sat, Sep 06, 2003 at 07:16:10PM -0700, Warner Losh wrote:
> : > imp         2003/09/06 19:16:10 PDT
> : >=20
> : >   FreeBSD src repository
> : >=20
> : >   Modified files:
> : >     usr.bin/make         cond.c=20
> : >   Log:
> : >   Keep up with minor changes to NetBSD.  Consider a variable empty wh=
en
> : >   not define.
> : >  =20
> : >   Obtained From: NetBSD (rev 1.18; sjg)
> : >  =20
> : >   Revision  Changes    Path
> : >   1.27      +1 -1      src/usr.bin/make/cond.c
> : >=20
> : 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?
>=20
> 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.
>=20
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,
--=20
Ruslan Ermilov		Sysadmin and DBA,
ru@sunbay.com		Sunbay Software Ltd,
ru@FreeBSD.org		FreeBSD committer

--82I3+IH0IqGh5yIs
Content-Type: application/pgp-signature
Content-Disposition: inline

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.1 (FreeBSD)

iD8DBQE/WyhtUkv4P6juNwoRAvFXAJsGI0npfrDK/oNqovkJuqBVhDa6iACeMeF0
tcVg0NtXK1jC7GjpCVys6pk=
=PJPZ
-----END PGP SIGNATURE-----

--82I3+IH0IqGh5yIs--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20030907124533.GA21121>