From mboxrd@z Thu Jan 1 00:00:00 1970 From: Mathieu Lirzin Subject: Re: [PATCH 06/13] build: Generate man pages after compiling guile objects. Date: Thu, 28 Jan 2016 16:44:54 +0100 Message-ID: <87oac5k8sp.fsf@gnu.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> <20160127203742.52245ef3@openmailbox.org> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:50849) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1aOokp-0006Am-Vs for guix-devel@gnu.org; Thu, 28 Jan 2016 10:45:05 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1aOokp-0006ly-2a for guix-devel@gnu.org; Thu, 28 Jan 2016 10:45:03 -0500 In-Reply-To: <20160127203742.52245ef3@openmailbox.org> (Eric Bavier's message of "Wed, 27 Jan 2016 20:37:42 -0600") 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: Eric Bavier Cc: guix-devel@gnu.org Hi Eric, Eric Bavier writes: > 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. I have pushed the reviewed patches. So now it is polished. :) > From 038645a3d14cd10fdb37f94703e463d8f7a3241a Mon Sep 17 00:00:00 2001 > From: Eric Bavier > Date: Wed, 27 Jan 2016 20:31:04 -0600 > Subject: [PATCH] doc: Generate manpages after .go are compiled. > > * build-aux/compile-all.scm: Exit 77 if no files to compile. > * Makefile.am (make-go): Rename target to make-go.stamp. Update if any > files were successfully compiled. > * doc.am (subcommand-manual-target): Add dependency on make-go.stamp. > Run help2man only if script input is changed. > --- > Makefile.am | 12 +++++++++--- > build-aux/compile-all.scm | 1 + > doc.am | 15 ++++++++++++--- > 3 files changed, 22 insertions(+), 6 deletions(-) > [...] > diff --git a/doc.am b/doc.am > index f15efcc..b3996d1 100644 > --- a/doc.am > +++ b/doc.am > @@ -106,9 +106,18 @@ doc/guix-daemon.1: nix/nix-daemon/guix-daemon.cc >=20=20 > define subcommand-manual-target >=20=20 > -doc/guix-$(1).1: guix/scripts/$(1).scm > - -LANGUAGE=3D $(top_builddir)/pre-inst-env \ > - $(HELP2MAN) --output=3D"$$@" "guix $(1)" > +# Note: The dependency on make-go.stamp is to force these docs to be mad= e only > +# after all guile modules have been compiled, so that they are not compi= led > +# during this rule. But we only want to actually generate the manpages = if the > +# corresponding script source has been changed. > +doc/guix-$(1).1: guix/scripts/$(1).scm make-go.stamp > + -$(AM_V_at)case '$$?' in \ > + *$$<*) \ > + echo " GEN $$@"; \ > + LANGUAGE=3D $(top_builddir)/pre-inst-env \ > + $(HELP2MAN) --output=3D"$$@" "guix $(1)" ;; \ > + *) : ;; \ > + esac IIUC, there is a problem with adding =E2=80=98make-go.stamp=E2=80=99 as a p= rerequisite here. Since building =E2=80=98.go=E2=80=99 files from the tarball will tri= gger the rebuild of man pages. Did I miss something? -- Mathieu Lirzin