Date: Thu, 02 Nov 2006 17:25:06 -0800 From: "Bruce A. Mah" <bmah@freebsd.org> To: freebsd-doc@freebsd.org Subject: Install docs oddity Message-ID: <454A9A72.4050005@freebsd.org>
next in thread | raw e-mail | index | archive | help
This is an OpenPGP/MIME signed message (RFC 2440 and 3156) --------------enigB08DF1CB04378A479F7BF508 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable This is a weird problem I ran into today. Basically I was trying to do a "make install" from the top of the doc tree and it seemed to be taking a *really* long time. When I looked at the output from make, it seemed to be iterating multiple times over the tree. To see the problem, chdir to the top of a checked-out doc/ tree (I'm on RELENG_6 if that's relevant) and do: % make -n install If you look at the commands that would get executed, it looks like we recurse twice into each of the language subdirectories...first we hit every subdirectory with some commands like this: echo "=3D=3D=3D> en_US.ISO8859-1" cd /usr/doc/en_US.ISO8859-1 && make install DIRPRFX=3Den_US.ISO8859-1/ Then we do a big loop over all of the subdirectories like this: for entry in en_US.ISO8859-1 bn_BD.ISO10646-1 da_DK.ISO8859-1 de_DE.ISO8859-1 el_GR.ISO8859-7 es_ES.ISO8859-1 fr_FR.ISO8859-1 it_IT.ISO8859-15 ja_JP.eucJP nl_NL.ISO8859-1 pl_PL.ISO8859-2 pt_BR.ISO8859-1 ru_RU.KOI8-R sr_YU.ISO8859-2 tr_TR.ISO8859-9 zh_CN.GB2312 zh_TW.Big5; do if test -d /usr/doc/${entry}.i386; then echo "=3D=3D=3D> ${entry}.i386 (install)"; edir=3D${entry}.i386; cd /usr/doc/${edir}; else echo "=3D=3D=3D> $entry (install)"; edir=3D${en= try}; cd /usr/doc/${edir}; fi; make install DIRPRFX=3D$edir/; done If make insists on iterating over each directory of the tree twice every time it gets to it, then with our three-level doc tree hierarchy, the files for every document get installed to the target directory eight times. :-( The first set of commands above is defined by the _SUBDIRUSE target in doc.subdir.mk. The loop is defined in bsd.subdir.mk, which gets included by doc.subdir.mk via bsd.obj.mk. The attached patch removes the iteration over subdirectories in doc.subdir.mk and just relies on bsd.subdir.mk to handle subdirectories. This seems to produce better behavior but I'm not sure if it's correct. Any comments? Bruce. PS. I'm also wondering how long this problem has existed. :-p There don't appear to have been any changes in this area since last year. --------------enigB08DF1CB04378A479F7BF508 Content-Type: application/pgp-signature; name="signature.asc" Content-Description: OpenPGP digital signature Content-Disposition: attachment; filename="signature.asc" -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.5 (Darwin) Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org iD8DBQFFSpp22MoxcVugUsMRAuCUAKDYA+iJ9BMdj8sgZ6AH1S1Ka2mjnQCglTzo QrIcJqlPJkDgwENvLykz8AU= =ylpK -----END PGP SIGNATURE----- --------------enigB08DF1CB04378A479F7BF508--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?454A9A72.4050005>