From owner-freebsd-current@FreeBSD.ORG Mon Jul 14 15:19:39 2003 Return-Path: Delivered-To: freebsd-current@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id D3B2237B401 for ; Mon, 14 Jul 2003 15:19:39 -0700 (PDT) Received: from ns2.gnf.org (ns2.gnf.org [63.196.132.68]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9885943F85 for ; Mon, 14 Jul 2003 15:19:38 -0700 (PDT) (envelope-from gtetlow@gnf.org) Received: from EXCHCLUSTER01.lj.gnf.org (exch01.lj.gnf.org [172.25.10.19]) by ns2.gnf.org (8.12.8p1/8.12.8) with ESMTP id h6EMJZoq080938 for ; Mon, 14 Jul 2003 15:19:35 -0700 (PDT) (envelope-from gtetlow@gnf.org) Received: from roark.gnf.org ([172.25.24.15]) by EXCHCLUSTER01.lj.gnf.org with Microsoft SMTPSVC(5.0.2195.5329); Mon, 14 Jul 2003 15:19:38 -0700 Received: from roark.gnf.org (localhost [127.0.0.1]) by roark.gnf.org (8.12.9/8.12.9) with ESMTP id h6EMJbi2044757; Mon, 14 Jul 2003 15:19:37 -0700 (PDT) (envelope-from gtetlow@gnf.org) Received: (from gtetlow@localhost) by roark.gnf.org (8.12.9/8.12.9/Submit) id h6EMJbXB044756; Mon, 14 Jul 2003 15:19:37 -0700 (PDT) Date: Mon, 14 Jul 2003 15:19:37 -0700 From: Gordon Tetlow To: Tim Kientzle Message-ID: <20030714221937.GL12996@roark.gnf.org> References: <20030713214715.H15811@root.org> <20030714004042.A38507@hub.freebsd.org> <20030714160952.GD12996@roark.gnf.org> <3F130805.3060900@acm.org> <20030714194815.GJ12996@roark.gnf.org> <3F132B65.1040506@acm.org> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="3rMDlCEgcaHQQFB+" Content-Disposition: inline In-Reply-To: <3F132B65.1040506@acm.org> User-Agent: Mutt/1.4i X-Habeas-SWE-1: winter into spring X-Habeas-SWE-2: brightly anticipated X-Habeas-SWE-3: like Habeas SWE (tm) X-Habeas-SWE-4: Copyright 2002 Habeas (tm) X-Habeas-SWE-5: Sender Warranted Email (SWE) (tm). The sender of this X-Habeas-SWE-6: email in exchange for a license for this Habeas X-Habeas-SWE-7: warrant mark warrants that this is a Habeas Compliant X-Habeas-SWE-8: Message (HCM) and not spam. Please report use of this X-Habeas-SWE-9: mark in spam to . X-OriginalArrivalTime: 14 Jul 2003 22:19:38.0161 (UTC) FILETIME=[036CCA10:01C34A56] cc: current@freebsd.org cc: Nate Lawson Subject: Re: Overdone rescue cleaning as part of buildworld? X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 14 Jul 2003 22:19:40 -0000 --3rMDlCEgcaHQQFB+ Content-Type: multipart/mixed; boundary="/t6ASE28jIy1gGy9" Content-Disposition: inline --/t6ASE28jIy1gGy9 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Mon, Jul 14, 2003 at 03:15:01PM -0700, Tim Kientzle wrote: > Gordon Tetlow wrote: > >On Mon, Jul 14, 2003 at 12:44:05PM -0700, Tim Kientzle wrote: > >>Gordon Tetlow wrote: > >>>>On Sun, Jul 13, 2003 at 09:49:46PM -0700, Nate Lawson wrote: > >>>>>It appears /rescue is cleaning for way too much as part of buildworl= d. > >>>>>For instance, groff is NOT part of /rescue (or we have other things = to > >>>>>discuss. :) This adds a bit of time to buildworld, can it be remove= d? > >>>> > >>Yeah, I took a few shortcuts; /rescue does build far more in > >>OBJDIR than it needs to, and similarly cleans much more than it needs > >>to. (Those extra dirs are never populated, but building and cleaning > >>them does still take time.) I believe the attached patch addresses > >>this issue; it trims down /usr/obj/usr/src/rescue/rescue/usr/src/... to > >>just the directories actually needed. > > > >This solution is kinda hackish, I have a more generic solution that makes > >it easier to add programs without having to specifically add > >CRUNCH_SRCDIR_foo to every program outside of src/bin and src/sbin. I'm > >hoping to iron out the wrinkles today and post the patches. Other than > >that the patch is pretty much complete. >=20 > Great! Looking forward to it. Attached is the patch. It basically makes CRUNCH_PROGS into a per directory item and then only does a make obj on the per program directory. I've incorporated the CRUNCH_SRCDIR_foo stuff you had although I had come up with a similar solution. It's lightly tested, some more eyes looking at it would be useful. I'm currently running it through a buildworld. -gordon --/t6ASE28jIy1gGy9 Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="rescue.diff" Content-Transfer-Encoding: quoted-printable --- //depot/vendor/freebsd/src/rescue/rescue/Makefile 2003/07/11 10:38:05 +++ //depot/user/gordon/dynamic/src/rescue/rescue/Makefile 2003/07/14 13:04= :49 @@ -1,4 +1,4 @@ -#$FreeBSD: src/rescue/rescue/Makefile,v 1.6 2003/07/11 16:57:43 gordon Exp= $ +#$FreeBSD: src/rescue/rescue/Makefile,v 1.5 2003/06/30 21:13:56 gordon Exp= $ # @(#)Makefile 8.1 (Berkeley) 6/2/93 =20 PROG=3D rescue @@ -66,9 +66,9 @@ # WARNING: Changing this list may require adjusting # /usr/include/paths.h as well! You were warned! # -CRUNCH_SRCDIRS+=3D$(.CURDIR)/../../bin $(.CURDIR)/../../usr.bin -CRUNCH_PROGS=3Dcat chflags chio chmod cp date dd df domainname echo ed \ - expr getfacl hostname kenv kill ln ls mkdir mv pax ps pwd \ +CRUNCH_SRCDIRS+=3Dbin +CRUNCH_PROGS_bin=3Dcat chflags chio chmod cp date dd df domainname echo \ + ed expr getfacl hostname kenv kill ln ls mkdir mv pax ps pwd \ realpath rm rmdir setfacl sh sleep stty sync test CRUNCH_LIBS+=3D-lcrypt -lcrypto -ledit -lkvm -ll -lm -ltermcap -lutil =20 @@ -82,18 +82,18 @@ CRUNCH_ALIAS_ed=3D red =20 .if !defined(NO_RCMNDS) -CRUNCH_PROGS+=3D rcp +CRUNCH_PROGS_bin+=3D rcp .endif =20 .if !defined(NO_TCSH) -CRUNCH_PROGS+=3D csh +CRUNCH_PROGS_bin+=3D csh CRUNCH_ALIAS_csh=3D -csh tcsh -tcsh CRUNCH_SUPPRESS_LINK_-csh=3D1 CRUNCH_SUPPRESS_LINK_-tcsh=3D1 .endif =20 #Is rmail of any use at all here? I think not. -#CRUNCH_PROGS+=3D rmail =20 +#CRUNCH_PROGS_bin+=3D rmail =20 =20 ################################################################### # Programs from standard /sbin @@ -104,8 +104,8 @@ # Note that mdmfs and shutdown have their own private 'pathnames.h' # headers in addition to the standard 'paths.h' header. # -CRUNCH_SRCDIRS+=3D$(.CURDIR)/../../sbin -CRUNCH_PROGS+=3Datm adjkerntz atacontrol badsect bsdlabel camcontrol \ +CRUNCH_SRCDIRS+=3Dsbin +CRUNCH_PROGS_sbin=3Datm adjkerntz atacontrol badsect bsdlabel camcontrol \ ccdconfig clri comcontrol conscontrol devfs dmesg dump \ dumpfs dumpon fore_dnld fsck fsck_ffs fsck_msdosfs fsdb \ fsirand gbde growfs ifconfig ilmid init ip6fw ipf ipfs ipfstat \ @@ -124,7 +124,7 @@ -lgeom -lmd -lreadline -lsbuf -lufs -lz=20 =20 .if ${MACHINE_ARCH} =3D=3D "i386" -CRUNCH_PROGS+=3D cxconfig fdisk +CRUNCH_PROGS_sbin+=3D cxconfig fdisk CRUNCH_ALIAS_bsdlabel=3D disklabel #CRUNCH_PROGS+=3D mount_nwfs mount_smbfs #CRUNCH_LIBS+=3D -lncp -lsmb @@ -135,11 +135,11 @@ .endif =20 .if ${MACHINE_ARCH} =3D=3D "ia64" -CRUNCH_PROGS+=3D mca gpt fdisk +CRUNCH_PROGS_sbin+=3D mca gpt fdisk .endif =20 .if ${MACHINE_ARCH} =3D=3D "sparc64" -CRUNCH_PROGS+=3D sunlabel +CRUNCH_PROGS_sbin+=3D sunlabel .endif =20 .if ${MACHINE_ARCH} =3D=3D "alpha" @@ -147,7 +147,7 @@ .endif =20 .if ${MACHINE_ARCH} =3D=3D "amd64" -CRUNCH_PROGS+=3D fdisk +CRUNCH_PROGS_sbin+=3D fdisk CRUNCH_ALIAS_bsdlabel=3D disklabel .endif =20 @@ -162,26 +162,26 @@ CRUNCH_ALIAS_mount_std=3D mount_devfs mount_fdescfs mount_linprocfs mount_= procfs =20 # dhclient has historically been troublesome... -CRUNCH_PROGS+=3Ddhclient +CRUNCH_PROGS_sbin+=3Ddhclient CRUNCH_BUILDOPTS_dhclient=3D-DRELEASE_CRUNCH -Dlint =20 ################################################################## # Programs from stock /usr/bin #=20 -CRUNCH_SRCDIRS+=3D$(.CURDIR)/../../usr.bin -CRUNCH_SRCDIRS+=3D$(.CURDIR)/../../gnu/usr.bin +CRUNCH_SRCDIRS+=3Dusr.bin +CRUNCH_SRCDIRS+=3Dgnu/usr.bin =20 -CRUNCH_PROGS+=3Dwall +CRUNCH_PROGS_usr.bin+=3Dwall =20 -CRUNCH_PROGS+=3Dgzip +CRUNCH_PROGS_gnu/usr.bin+=3Dgzip CRUNCH_ALIAS_gzip=3Dgunzip gzcat zcat =20 -CRUNCH_PROGS+=3Dbzip2 +CRUNCH_PROGS_usr.bin+=3Dbzip2 CRUNCH_ALIAS_bzip2=3Dbunzip2 bzcat CRUNCH_LIBS+=3D-lbz2 =20 -CRUNCH_PROGS+=3Dtar -CRUNCH_PROGS+=3Dvi +CRUNCH_PROGS_gnu/usr.bin+=3Dtar +CRUNCH_PROGS_usr.bin+=3Dvi CRUNCH_ALIAS_vi=3Dex =20 ################################################################## @@ -204,7 +204,8 @@ =20 # Program names and their aliases contribute hardlinks to 'rescue' executa= ble, # except for those that get suppressed. -.for P in $(CRUNCH_PROGS) +.for D in $(CRUNCH_SRCDIRS) +.for P in $(CRUNCH_PROGS_$(D)) .ifndef CRUNCH_SUPPRESS_LINK_${P} LINKS +=3D $(BINDIR)/$(PROG) $(BINDIR)/$(P) .endif @@ -214,6 +215,7 @@ .endif .endfor .endfor +.endfor =20 all: $(PROG) exe: $(PROG) @@ -221,7 +223,7 @@ $(CONF): Makefile echo \# Auto-generated, do not edit >$(.TARGET) .for D in $(CRUNCH_SRCDIRS) - echo srcdirs $(D) >>$(.TARGET) + echo srcdirs $(.CURDIR)/../../$(D) >>$(.TARGET) .endfor .ifdef CRUNCH_BUILDOPTS echo buildopts $(CRUNCH_BUILDOPTS) >>$(.TARGET) @@ -229,7 +231,8 @@ .ifdef CRUNCH_LIBS echo libs $(CRUNCH_LIBS) >>$(.TARGET) .endif -.for P in $(CRUNCH_PROGS) +.for D in $(CRUNCH_SRCDIRS) +.for P in $(CRUNCH_PROGS_$(D)) echo progs $(P) >>$(.TARGET) .ifdef CRUNCH_SRCDIR_${P} echo special $(P) srcdir $(CRUNCH_SRCDIR_${P}) >>$(.TARGET) @@ -241,6 +244,7 @@ echo ln $(P) $(A) >>$(.TARGET) .endfor .endfor +.endfor =20 =20 $(OUTPUTS): $(CONF) @@ -256,7 +260,7 @@ # shell scripts so we can remove this nonsense. build-tools: .for _tool in bin/csh bin/sh=20 - cd ${.CURDIR}/../../${_tool}; \ + cd $(.CURDIR)/../../${_tool}; \ MAKEOBJDIRPREFIX=3D${CRUNCHOBJS} make DIRPRFX=3Drescue/${_tool} build-too= ls .endfor =20 @@ -266,7 +270,15 @@ # targets should NOT be propagated into the components. cleandepend cleandir obj objlink: .for D in $(CRUNCH_SRCDIRS) - cd ${D} && MAKEOBJDIRPREFIX=3D${CANONICALOBJDIR} make ${.TARGET} +.for P in $(CRUNCH_PROGS_$(D)) +.ifdef CRUNCH_SRCDIR_${P} + cd ${CRUNCH_SRCDIR_$(P)} && \ + MAKEOBJDIRPREFIX=3D${CANONICALOBJDIR} make ${.TARGET} +.else + cd $(.CURDIR)/../../${D}/${P} && \ + MAKEOBJDIRPREFIX=3D${CANONICALOBJDIR} make ${.TARGET} +.endif +.endfor .endfor =20 clean: @@ -274,8 +286,16 @@ if [ -e ${.OBJDIR}/$(OUTMK) ]; then \ MAKEOBJDIRPREFIX=3D${CRUNCHOBJS} make -f $(OUTMK) clean; \ fi -.for D in $(CRUNCH_SRCDIRS) $(EXTRA_SRCDIRS) - cd ${D} && MAKEOBJDIRPREFIX=3D${CRUNCHOBJS} make clean +.for D in $(CRUNCH_SRCDIRS) +.for P in $(CRUNCH_PROGS_$(D)) +.ifdef CRUNCH_SRCDIR_${P} + cd ${CRUNCH_SRCDIR_$(P)} && \ + MAKEOBJDIRPREFIX=3D${CANONICALOBJDIR} make ${.TARGET} +.else + cd $(.CURDIR)/../../${D}/${P} && \ + MAKEOBJDIRPREFIX=3D${CANONICALOBJDIR} make ${.TARGET} +.endif +.endfor .endfor =20 .include --/t6ASE28jIy1gGy9-- --3rMDlCEgcaHQQFB+ Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.2.1 (FreeBSD) iD8DBQE/Eyx5Ru2t9DV9ZfsRAk4TAKCLsg8Yom009eM4rv672DB703+3uQCgndzX oAOqbMFTDb/EfX7vC8U5Qcs= =ZRXG -----END PGP SIGNATURE----- --3rMDlCEgcaHQQFB+--