From owner-cvs-all@FreeBSD.ORG Thu Jan 8 09:58:24 2004 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 4733716A4CE; Thu, 8 Jan 2004 09:58:24 -0800 (PST) Received: from phantom.cris.net (phantom.cris.net [212.110.130.74]) by mx1.FreeBSD.org (Postfix) with ESMTP id C27D843D54; Thu, 8 Jan 2004 09:57:48 -0800 (PST) (envelope-from ru@FreeBSD.org.ua) Received: from phantom.cris.net (ru@localhost [127.0.0.1]) by phantom.cris.net (8.12.10/8.12.10) with ESMTP id i08Hvkl7034651; Thu, 8 Jan 2004 19:57:46 +0200 (EET) (envelope-from ru@FreeBSD.org.ua) Received: (from ru@localhost) by phantom.cris.net (8.12.10/8.12.10/Submit) id i08Hvk17034650; Thu, 8 Jan 2004 19:57:46 +0200 (EET) (envelope-from ru) Date: Thu, 8 Jan 2004 19:57:46 +0200 From: Ruslan Ermilov To: "Brian F. Feldman" Message-ID: <20040108175746.GB33759@FreeBSD.org.ua> References: <20040108165519.GA33759@FreeBSD.org.ua> <200401081707.i08H7Wbh011594@green.bikeshed.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="yEPQxsgoJgBvi8ip" Content-Disposition: inline In-Reply-To: <200401081707.i08H7Wbh011594@green.bikeshed.org> User-Agent: Mutt/1.5.5.1i cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/share/mk bsd.obj.mk X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 08 Jan 2004 17:58:24 -0000 --yEPQxsgoJgBvi8ip Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Thu, Jan 08, 2004 at 12:07:32PM -0500, Brian F. Feldman wrote: > Ruslan Ermilov wrote: > > On Thu, Jan 08, 2004 at 11:36:19AM -0500, Brian F. Feldman wrote: > > > Ruslan Ermilov wrote: > > > > : $ make MAKE=3D'/usr/bin/make -DFOO' print-make > > > > : /usr/bin/make -DFOO > > > > : $ make MAKE=3D'/usr/bin/make -DFOO' -V MAKE > > > > : make > > > >=20 > > > > If you really need to access command-line arguments, there > > > > is the .MAKEFLAGS variable available for that purpose. > > > >=20 > > > > But why do you need to ``make MAKE=3D'/usr/bin/make -DFOO' bar'' > > > > in the first place instead of simple ``make -DFOO bar''? If > > > > "bar" is recursive (i.e., runs ${MAKE} subprocesses), then > > > > -DFOO will be properly propagated: > > >=20 > > > Think about this: what options to ${MAKE} are there that have nothing= to do=20 > > > with setting defines? There's actually quite a few; the one in parti= cular=20 > > > that I care about is "-f"; if I want to use bsd.subdir.mk to simply a= pply=20 > > > one BSD Makefile to several directions (which I _do_), I need to use = -f,=20 > > > i.e.: > > >=20 > > > MAKE+=3D -f ${.CURDIR}/drivers/Makefile.subdriver > > >=20 > > > The only think that broke this was the cleandir target. > > >=20 > > Then you should be using the .MAKEFLAS variables here, see > > sys/modules/Makefile for one working example, and let me > > know if it works for you. >=20 > Since .MAKEFLAGS is doesn't expand variables, I have to do it this (prett= y=20 > ugly) way: >=20 > .MAKEFLAGS:=3D ${.MAKEFLAGS} -f ${.CURDIR}/drivers/Makefile.subdriver >=20 : # cat Makefile : all: : @cd ${.CURDIR}; ${MAKE} print-foo :=20 : .MAKEFLAGS+=3D FOO=3D${.CURDIR} :=20 : print-foo: : @echo ${FOO} : # make : /tmp > But it does at least work (does it definitely always get added to ${MAKE}= ?).=20 >=20 It's actually in the make(1) manpage: : .MAKEFLAGS : The environment variable MAKEFLAGS may contain anything that : may be specified on make's command line. Its contents are : stored in make's .MAKEFLAGS variable. Anything specified on : make's command line is appended to the .MAKEFLAGS variable : which is then entered into the environment as MAKEFLAGS for : all programs which make executes. > I don't see the bsd.obj.mk change as being anything but slightly more=20 > correct, so I wouldn't see a good reason to remove it either way. I'm gl= ad=20 > we've clarified the issue. >=20 I never said I want the commit to be backed out, did I? ;) I even see it as a slight improvement, but for a reason that is different from what is in the commit log -- it saves one make(1) invocation. I think that a null commit would be in order though. Cheers, --=20 Ruslan Ermilov FreeBSD committer ru@FreeBSD.org --yEPQxsgoJgBvi8ip Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.4 (FreeBSD) iD8DBQE//ZoaUkv4P6juNwoRAqSQAJ9NMo3COJvIaHMC5FX8qW53W0tklgCfWgwF YBBmHyz3aBy+l3BJ/A+ecYI= =M5YK -----END PGP SIGNATURE----- --yEPQxsgoJgBvi8ip--