From owner-freebsd-hackers@FreeBSD.ORG Wed Jul 30 14:27:59 2003 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 58BD037B401; Wed, 30 Jul 2003 14:27:59 -0700 (PDT) Received: from whale.sunbay.crimea.ua (whale.sunbay.crimea.ua [212.110.138.65]) by mx1.FreeBSD.org (Postfix) with ESMTP id D43D943F75; Wed, 30 Jul 2003 14:27:52 -0700 (PDT) (envelope-from ru@sunbay.com) Received: from whale.sunbay.crimea.ua (ru@localhost [127.0.0.1]) h6ULRi0U037405 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 31 Jul 2003 00:27:48 +0300 (EEST) (envelope-from ru@sunbay.com) Received: (from ru@localhost) by whale.sunbay.crimea.ua (8.12.9/8.12.8/Submit) id h6ULRiCP037400; Thu, 31 Jul 2003 00:27:44 +0300 (EEST) (envelope-from ru) Date: Thu, 31 Jul 2003 00:27:44 +0300 From: Ruslan Ermilov To: Juli Mallett Message-ID: <20030730212744.GJ33188@sunbay.com> References: <20030730212049.GI33188@sunbay.com> <20030730162320.A66578@FreeBSD.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="Do4IU1xF/9sod/r6" Content-Disposition: inline In-Reply-To: <20030730162320.A66578@FreeBSD.org> User-Agent: Mutt/1.5.4i cc: hackers@FreeBSD.ORG cc: current@FreeBSD.ORG Subject: Re: make -U X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 30 Jul 2003 21:27:59 -0000 --Do4IU1xF/9sod/r6 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Wed, Jul 30, 2003 at 04:23:20PM -0500, Juli Mallett wrote: > * Ruslan Ermilov [ Date: 2003-07-30 ] > [ w.r.t. make -U ] > > Sorry, I've accidentally dropped an email about `make -U'. > >=20 > > I think that it's not needed, since the functionality can > > easily be achieved by running "make FOO=3D", i.e., assigning > > an empty value. Remember that command line variables take > > precedence over globals, so the following makefile, > >=20 > > FOO+=3D bar > >=20 > > all: > > @echo ${FOO} > >=20 > > when run as ``make FOO=3Dfoo'', will print just ``foo''. >=20 > Does that work for the .if defined() case, too? Makefiles can grow > to be more complex than just that sort of stuff, after all :) >=20 Not sure what do you mean. The "make -U FOO" was support to undefine the FOO variable, as it the ``.undef FOO'' was called at the end of makefile. Of course, setting FOO=3D on a command line still gets you a "defined" variable, but =2Eif defined(FOO) && !empty(FOO) should do the trick. Try this out with "make FOO=3D": FOO=3D bar all: =2Eif defined(FOO) && !empty(FOO) @echo FOO is set =2Eendif Cheers, --=20 Ruslan Ermilov Sysadmin and DBA, ru@sunbay.com Sunbay Software Ltd, ru@FreeBSD.org FreeBSD committer --Do4IU1xF/9sod/r6 Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE/KDhQUkv4P6juNwoRAssuAKCJhO7zOgldMvcfLNOZY8/j7FpaIQCdEmD6 HhMwY+Hmb9np9MfNzwI6u3c= =YQZr -----END PGP SIGNATURE----- --Do4IU1xF/9sod/r6--