Subject: [bug#51122] [PATCH v2] maint: Factorize po xref translation.

From: "pelzflorian (Florian Pelz)" <[email-masked]>
Date: Tue, 12 Oct 2021 17:56:11 +0200

On Tue, Oct 12, 2021 at 12:06:57AM +0200, Julien Lepiller wrote:
> Le Mon, 11 Oct 2021 19:17:28 +0200,
> "pelzflorian (Florian Pelz)" <[email-masked]> a écrit :
> > Also POXREF is run twice for each
> > guix.??.texi file.  Maybe I did something wrong, maybe it is your
> > patch.  Not sure.  Testing takes long anyway.
> It only runs it once here, but there are three files to translate:
> guix.xx.texi, guix-cookbook.xx.texi and contributing.xx.texi.

At least when depending on make-core-go instead of make-go, it does
POXREF each file twice, in between printing “Updating
doc/version.texi”.  Anyway, this is more important:

> It looks like depending on make-go or make-core-go means we rebuild the
> texi files everytime we run "make", so that's not great :/.

We definitely want to compile guix/build/po.scm, I think, because it
should be run each time a guix-manual.LL.po or guix-cookbook.LL.po
file changes.

GNU Make manual says
<https://www.gnu.org/software/make/manual/html_node/Phony-Targets.html#Phony-Targets>:
> A phony target should not be a prerequisite of a real target file; if
> it is, its recipe will be run every time make goes to update that
> file.

But Makefile.am defines guile-compilation-rule to create a Phony target.

This is bad for us because likely there should not be duplicate code
to compile guix/build/po.scm and to compile the rest.

So I presume part of guile-compilation-rule must be split off?

Regards,
Florian