From owner-freebsd-doc Tue Aug 13 9:13:36 2002 Delivered-To: freebsd-doc@freebsd.org Received: from mx1.FreeBSD.org (mx1.FreeBSD.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id E731937B405 for ; Tue, 13 Aug 2002 09:13:20 -0700 (PDT) Received: from mx3.datanet.hu (mx3.datanet.hu [194.149.13.160]) by mx1.FreeBSD.org (Postfix) with ESMTP id 8120E43E9E for ; Tue, 13 Aug 2002 09:13:03 -0700 (PDT) (envelope-from sziszi@bsd.hu) Received: from fonix.adamsfamily.xx (nilus-1647.adsl.datanet.hu [195.56.94.123]) by mx3.datanet.hu (DataNet) with ESMTP id 7A05E1E9A6C for ; Tue, 13 Aug 2002 18:11:29 +0200 (CEST) Received: from fonix.adamsfamily.xx (localhost [127.0.0.1]) by fonix.adamsfamily.xx (8.12.5/8.12.5) with ESMTP id g7DGBS8g001574 for ; Tue, 13 Aug 2002 18:11:28 +0200 (CEST) (envelope-from sziszi@bsd.hu) Received: (from cc@localhost) by fonix.adamsfamily.xx (8.12.5/8.12.5/Submit) id g7DGBRFL001573 for freebsd-doc@FreeBSD.ORG; Tue, 13 Aug 2002 18:11:27 +0200 (CEST) X-Authentication-Warning: fonix.adamsfamily.xx: cc set sender to sziszi@bsd.hu using -f Date: Tue, 13 Aug 2002 18:11:26 +0200 From: Szilveszter Adam To: freebsd-doc@FreeBSD.ORG Subject: Re: repetitive docs install? Message-ID: <20020813161125.GC1105@fonix.adamsfamily.xx> Mail-Followup-To: Szilveszter Adam , freebsd-doc@FreeBSD.ORG References: <20020811225529.GH2818@vectors.cx> <20020812173917.GB2080@fonix.adamsfamily.xx> <20020812213302.GS71774@clan.nothing-going-on.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="uAKRQypu60I7Lcqm" Content-Disposition: inline In-Reply-To: <20020812213302.GS71774@clan.nothing-going-on.org> User-Agent: Mutt/1.5.1i Sender: owner-freebsd-doc@FreeBSD.ORG Precedence: bulk List-ID: List-Archive: (Web Archive) List-Help: (List Instructions) List-Subscribe: List-Unsubscribe: X-Loop: FreeBSD.org --uAKRQypu60I7Lcqm Content-Type: text/plain; charset=us-ascii Content-Disposition: inline On Mon, Aug 12, 2002 at 10:33:02PM +0100, Nik Clayton wrote: > I'd definitely like to see the patches. Is this a bug in the .mk files, > or a bug in make? OK, find enclosed the two patches that I use at present. One is against doc/share/mk/doc.subdir.mk and the other is against www/share/mk/web.site.mk. As for your question, it is not a bug in make(1) but rather duplication in the .mk infrastructure. Earlier there was no code in src/share/mk/bsd.subdir.mk to recursively make the targets in subdirectories, rather this was implemented in other .mk files. (For the base system this was bsd.own.mk, for us the files referred to above). The MFC in rev 1.30.2.2 merged the _SUBDIR macro from bsd.own.mk into bsd.subdir.mk, but the doc (and www) build infrastucture was not changed. So, we were instructing make(1) to loop the subdirs once in bsd.subdir.mk (pulled in by include) and once in eg doc.subdir.mk. Make(1) only did what was requested. The _SUBDIRUSE macro was only called from the realinstall target in doc.subdir.mk, so there only "make install" was affected. But for the website build, the similar _PROGSUBDIR macro was also called from the "all" target, so there even the build did loop uselessly. This was all the more annoying because at least the "prstats" target is always rerun no matter what and takes quite a lot to complete. I am not entirely sure if any other changes are needed on -STABLE, but the general idea is this: since we include bsd.subdir.mk, there should be no need for separate macros that duplicate the functionality of the _SUBDIR macro from there. One problem stays, however: this has to be conditionalized, since earlier releases of FreeBSD, including early versions of 4.6-STABLE, will still need the old framework, if doc building is to be supported on them. -- Regards: Szilveszter ADAM Szombathely Hungary --uAKRQypu60I7Lcqm Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="doc::share::mk::doc.subdir.mk.patch" Index: doc.subdir.mk =================================================================== RCS file: /usr/home/cc/ncvs/freebsd//doc/share/mk/doc.subdir.mk,v retrieving revision 1.9 diff -u -r1.9 doc.subdir.mk --- doc.subdir.mk 13 Dec 2001 23:51:26 -0000 1.9 +++ doc.subdir.mk 20 May 2002 11:08:31 -0000 @@ -62,7 +62,7 @@ .if !target(install) install: afterinstall symlinks afterinstall: realinstall -realinstall: beforeinstall _SUBDIRUSE +realinstall: beforeinstall .endif package: realpackage symlinks --uAKRQypu60I7Lcqm Content-Type: text/plain; charset=us-ascii Content-Disposition: attachment; filename="www::share::mk::web.site.mk.patch" Index: web.site.mk =================================================================== RCS file: /usr/home/cc/ncvs/freebsd//www/share/mk/web.site.mk,v retrieving revision 1.43 diff -u -r1.43 web.site.mk --- web.site.mk 7 Aug 2002 03:17:10 -0000 1.43 +++ web.site.mk 7 Aug 2002 16:46:31 -0000 @@ -34,7 +34,7 @@ LN?= /bin/ln MKDIR?= /bin/mkdir MV?= /bin/mv -PERL?= /usr/bin/perl5 +PERL?= /usr/local/bin/perl5 RM?= /bin/rm SED?= /usr/bin/sed SH?= /bin/sh @@ -150,7 +150,7 @@ # # Build most everything # -all: ${COOKIE} orphans ${GENDOCS} ${DATA} ${LOCAL} ${CGI} _PROGSUBDIR +all: ${COOKIE} orphans ${GENDOCS} ${DATA} ${LOCAL} ${CGI} #_PROGSUBDIR # # Warn about anything in DOCS that has no translation @@ -201,7 +201,7 @@ ${INSTALL} ${COPY} ${INSTALLFLAGS} -o ${CGIOWN} -g ${CGIGRP} -m ${CGIMODE} _ALLINSTALL+= ${GENDOCS} ${DATA} ${LOCAL} -realinstall: ${COOKIE} ${_ALLINSTALL} ${CGI} _PROGSUBDIR +realinstall: ${COOKIE} ${_ALLINSTALL} ${CGI} .if !empty(_ALLINSTALL) @${MKDIR} -p ${DOCINSTALLDIR} .for entry in ${_ALLINSTALL} --uAKRQypu60I7Lcqm-- To Unsubscribe: send mail to majordomo@FreeBSD.org with "unsubscribe freebsd-doc" in the body of the message