Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 13 Aug 2002 18:11:26 +0200
From:      Szilveszter Adam <sziszi@bsd.hu>
To:        freebsd-doc@FreeBSD.ORG
Subject:   Re: repetitive docs install?
Message-ID:  <20020813161125.GC1105@fonix.adamsfamily.xx>
In-Reply-To: <20020812213302.GS71774@clan.nothing-going-on.org>
References:  <20020811225529.GH2818@vectors.cx> <20020812173917.GB2080@fonix.adamsfamily.xx> <20020812213302.GS71774@clan.nothing-going-on.org>

next in thread | previous in thread | raw e-mail | index | archive | help

--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




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20020813161125.GC1105>