From mboxrd@z Thu Jan 1 00:00:00 1970 From: Eric Bavier Subject: Re: [PATCH 06/13] build: Generate man pages after compiling guile objects. Date: Wed, 27 Jan 2016 20:37:42 -0600 Message-ID: <20160127203742.52245ef3@openmailbox.org> References: <1453666771-16869-1-git-send-email-mthl@gnu.org> <1453666771-16869-7-git-send-email-mthl@gnu.org> <87d1somgfd.fsf@gnu.org> <87zivs2jej.fsf@gnu.org> Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="MP_/dDc_UU==Lu//nP5q+6PUmdD" Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:44327) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOh4v-0000LA-1y for guix-devel@gnu.org; Thu, 28 Jan 2016 02:33:18 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aOh4o-00064c-US for guix-devel@gnu.org; Thu, 28 Jan 2016 02:33:14 -0500 Received: from smtp6.openmailbox.org ([62.4.1.40]:49681) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOh4o-00064M-IS for guix-devel@gnu.org; Thu, 28 Jan 2016 02:33:10 -0500 In-Reply-To: <87zivs2jej.fsf@gnu.org> List-Id: "Development of GNU Guix and the GNU System distribution." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org Sender: guix-devel-bounces+gcggd-guix-devel=m.gmane.org@gnu.org To: Mathieu Lirzin Cc: guix-devel@gnu.org --MP_/dDc_UU==Lu//nP5q+6PUmdD Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline On Tue, 26 Jan 2016 21:08:36 +0100 Mathieu Lirzin wrote: > ludo@gnu.org (Ludovic Court=C3=A8s) writes: >=20 > > Mathieu Lirzin skribis: > > > >> * configure.ac (BUILD_FROM_GIT): New Automake conditional. > >> * doc.am (SUBCOMMANDS): Delete variable. > >> (dist_man1_MANS): List all subcommands man pages. > >> (doc/guix.1): Build only if BUILD_FROM_GIT. Depend on 'scripts/guix' > >> instead of all subcommands. > >> [BUILD_DAEMON] (doc/guix-daemon): Likewise. Replace the > >> 'nix/nix-daemon/guix-daemon.cc' prerequisite with 'guix-daemon'. > >> [BUILD_FROM_GIT] (gen_man): New variable. > >> [BUILD_FROM_GIT] (doc/guix-%.1): New target. > >> (CLEANFILES) [BUILD_FROM_GIT]: Add $(dist_man1_MANS). > > > > I like the speedup, but not the =E2=80=98BUILD_FROM_GIT=E2=80=99 approa= ch. :-) > > It reminds me of maintainer-mode and all its warts (info "(automake) > > maintainer-mode"). >=20 > The BUILD_FROM_GIT is inspired by what is done for GNU Hello. ;) > However I don't have a strong opinion on this. >=20 > > Namely, I think it=E2=80=99s best to have the help2man rule always trig= gered > > whenever the corresponding .scm file is newer, rather than have it > > triggered or not based on a guess of what the user wants/can do. >=20 > OK. >=20 > > Having said that, I=E2=80=99m not sure what to do. Commit 0af3f404 rev= erted the > > original approach, which was to depend on .go files (and obviously > > wouldn=E2=80=99t work as we want.) > > > > So we want to delay the build of man pages without making the dependency > > on build products explicit. Hmm, not sure what can be done. >=20 > I have tried to add $(GOBJECTS) to BUILT_SOURCES and let the man pages > prerequisites like in 0af3f404. The problem was that the build didn't > fully took advantage of possible parallelisms because everything had to > wait for $(GOBJECTS) to complete before compiling anything else, and the > modules are loaded using only one thread. >=20 > Another approach is to embed =E2=80=98help2man=E2=80=99 (which is what Co= reutils is > doing), so we can let the man pages depend on .go files. This seems > reasonable to me even if it means adding 20K of Perl in the repo. ;) >=20 > WDYT? Here's my rough first take at this. It uses the status 77 convention to update a sentinel file and selectively run help2man. I realize the silent rule output isn't yet polished. `~Eric --MP_/dDc_UU==Lu//nP5q+6PUmdD Content-Type: text/x-patch Content-Transfer-Encoding: base64 Content-Disposition: attachment; filename=0001-doc-Generate-manpages-after-.go-are-compiled.patch RnJvbSAwMzg2NDVhM2QxNGNkMTBmZGIzN2Y5N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