From owner-cvs-all Sat May 4 17:51:28 2002 Delivered-To: cvs-all@freebsd.org Received: from panzer.kdm.org (panzer.kdm.org [216.160.178.169]) by hub.freebsd.org (Postfix) with ESMTP id 797B137B405; Sat, 4 May 2002 17:51:13 -0700 (PDT) Received: (from ken@localhost) by panzer.kdm.org (8.11.6/8.9.1) id g450p8b28078; Sat, 4 May 2002 18:51:08 -0600 (MDT) (envelope-from ken) Date: Sat, 4 May 2002 18:51:08 -0600 From: "Kenneth D. Merry" To: Bruce Evans Cc: Ruslan Ermilov , cvs-committers@FreeBSD.ORG, cvs-all@FreeBSD.ORG, current@FreeBSD.ORG Subject: Re: cvs commit: src/share/mk bsd.doc.mk bsd.docb.mk bsd.info.mk bsd.init.mk bsd.lib.mk bsd.libnames.mk bsd.man.mk bsd.nls.mk bsd.obj.mk bsd.own.mk bsd.prog.mk bsd.sgml.mk bsd.subdir.mk sys.mk Message-ID: <20020504185108.A27998@panzer.kdm.org> References: <20020503220935.A17720@panzer.kdm.org> <20020505095658.W710-100000@gamplex.bde.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="pf9I7BMVVzbSWLtt" Content-Disposition: inline User-Agent: Mutt/1.2.5.1i In-Reply-To: <20020505095658.W710-100000@gamplex.bde.org>; from bde@zeta.org.au on Sun, May 05, 2002 at 10:05:18AM +1000 Sender: owner-cvs-all@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.ORG --pf9I7BMVVzbSWLtt Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Sun, May 05, 2002 at 10:05:18 +1000, Bruce Evans wrote: > On Fri, 3 May 2002, Kenneth D. Merry wrote: > > > On Fri, May 03, 2002 at 22:00:05 -0600, Kenneth D. Merry wrote: > > > The attached patch "fixes" it for me. > > > > > > I'm sure someone can come up with a cleaner way of fixing the problem. > > It doesn't seem to be very easy to fix. Kernel makefiles should not depend > on anything outside of the kernel tree. Depending on bsd.kern.mk is bad > enough. > > > Sorry, it was this commit that broke building -current kernels on -stable: > > > > ru 2002/04/22 08:47:11 PDT > > > > Modified files: > > sys/conf kmod.mk > > Log: > > Use standard bsd.init.mk prologue. > > > > Revision Changes Path > > 1.116 +1 -7 src/sys/conf/kmod.mk > > > > > ==== //depot/FreeBSD-zero/src/sys/conf/kmod.mk#9 - /usr/home/ken/perforce/FreeBSD-zero/src/sys/conf/kmod.mk ==== > > > *** /tmp/tmp.18430.0 Fri May 3 21:51:56 2002 > > > --- /usr/home/ken/perforce/FreeBSD-zero/src/sys/conf/kmod.mk Fri May 3 21:51:43 2002 > > > *************** > > > *** 86,92 **** > > > --- 86,98 ---- > > > .error "Do not use KMODDEPS on 5.0+, use MODULE_VERSION/MODULE_DEPEND" > > > .endif > > > > > > + .if exists(____) > > It will never exist when it has 2 layers of misspelling like this :-). I grabbed the __ part from bsd.init.mk, but I suppose I was a bit confused. So if I do: .if exists() with make(1) do the right thing? > > > .include > > > + .elif exists(../../../share/mk/bsd.init.mk) > > > + .include "../../../share/mk/bsd.init.mk" > > > + .elif exists(../../../../share/mk/bsd.init.mk) > > > + .include "../../../../share/mk/bsd.init.mk" > > > + .endif > > > > > > .SUFFIXES: .out .o .c .cc .cxx .C .y .l .s .S > > > > > Not using it when it isn't in the standard place would be less ugly. How about this? Assuming exists() does the right thing (does it?), this patch would restore the previous behavior if bsd.init.mk isn't there. Ken -- Kenneth Merry ken@kdm.org --pf9I7BMVVzbSWLtt Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="kmod.mk.20020504" ==== //depot/FreeBSD-zero/src/sys/conf/kmod.mk#9 - /usr/home/ken/perforce/FreeBSD-zero/src/sys/conf/kmod.mk ==== *** /tmp/tmp.6730.0 Sat May 4 18:49:30 2002 --- /usr/home/ken/perforce/FreeBSD-zero/src/sys/conf/kmod.mk Sat May 4 18:47:22 2002 *************** *** 86,92 **** --- 86,99 ---- .error "Do not use KMODDEPS on 5.0+, use MODULE_VERSION/MODULE_DEPEND" .endif + .if exists() .include + .elif !target(__initialized__) + __initialized__: + .if exists(${.CURDIR}/../Makefile.inc) + .include "${.CURDIR}/../Makefile.inc" + .endif + .endif .SUFFIXES: .out .o .c .cc .cxx .C .y .l .s .S --pf9I7BMVVzbSWLtt-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe cvs-all" in the body of the message