Hi Julien,

First of all, thank you for your work.

El Tue, 23 Apr 2019 09:28:19 +0200
Julien Lepiller <jul...@lepiller.eu> escribió:
> This is a very good idea, but I think it leaves a stub texi that
> won't get rebuilt because it's younger than po files. 

Yes, you are right indeed. I didn't noticed because I was updating
the .po file manually.

> What if we add a toucgh invocation to reset the modification time
> of these stubs, to ensure make will want to rebuild them?

What about the attached patch? I've just tested it with the other
patch that seems to be missing or blocked by its size, nothing up my
sleeves this time. 0:-)

Best regards,
Miguel
>From fe873d65dd5795bdafc9eed66888f7d2e9bf6b4c Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?Miguel=20=C3=81ngel=20Arruga=20Vivas?=
 <rosen644...@gmail.com>
Date: Tue, 23 Apr 2019 11:30:32 +0200
Subject: [PATCH 1/4] bootstrap: Break automake dependency on generated files.

* bootstrap: Generate stub files for the manual translations whose
generated files are not included in the VCS.
---
 bootstrap | 14 ++++++++++++++
 1 file changed, 14 insertions(+)

diff --git a/bootstrap b/bootstrap
index cb774bc737..c0b5af7677 100755
--- a/bootstrap
+++ b/bootstrap
@@ -2,4 +2,18 @@
 # Create the build system.
 
 set -e -x
+
+# Generate stubs for translations.
+langs=`find po/doc -type f -name '*.po' \
+        | sed -e 's,guix-manual\.,,' \
+        | xargs -n 1 -I{} basename {} .po`
+for lang in ${langs}; do
+    if [ ! -e "doc/guix.${lang}.texi" ]; then
+	echo "@setfilename guix.${lang}.info" > "doc/guix.${lang}.texi"
+	echo "@include version-${lang}.texi" >> "doc/guix.${lang}.texi"
+	# Ensure .po file is newer.
+	touch "po/doc/guix-manual.${lang}.po"
+    fi
+done
+
 exec autoreconf -vfi
-- 
2.21.0

Reply via email to