Subject: [PATCH] Fix make dist

From: Julien Lepiller <[email-masked]>
Date: Sun, 29 Apr 2018 16:24:52 +0200

Hi,

these patches add the documentation pot files to the distribution and
exclude them from being checked for store references. That's because
they contain example store paths. The second one renames them so they
have a more meaningful name for the TP.
>From d36b9eeb7ee8811e51f82c41ae17ebca863acad5 Mon Sep 17 00:00:00 2001
From: Julien Lepiller <[email-masked]>
Date: Sun, 29 Apr 2018 14:00:13 +0200
Subject: [PATCH 1/2] nls: Distribute doc pot files.

* po/doc/local.mk (EXTRA_DIST): Add guix.pot and contributing.pot.
* Makefile.am (assert-no-store-file-names): exclude them and
documentation po files.
---
 Makefile.am     | 1 +
 po/doc/local.mk | 2 ++
 2 files changed, 3 insertions(+)

diff --git a/Makefile.am b/Makefile.am
index 9f134c970..b9950a24b 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -741,6 +741,7 @@ assert-no-store-file-names: $(distdir)/ChangeLog
 	     --exclude=*.info-[0-9] --exclude=*.dot				\
 	     --exclude=*.eps --exclude-dir=bootstrap				\
 	     --exclude=guix-prettify.el						\
+	     --exclude=guix.pot --exclude=guix.*.po						\
 	     --exclude=ChangeLog						\
 	     -E "$(storedir)/[a-z0-9]{32}-" $(distdir) ;			\
 	then									\
diff --git a/po/doc/local.mk b/po/doc/local.mk
index 4e1c28307..d104bfcbe 100644
--- a/po/doc/local.mk
+++ b/po/doc/local.mk
@@ -17,6 +17,8 @@
 # along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 EXTRA_DIST = \
+  %D%/contributing.pot \
+  %D%/guix.pot \
   %D%/contributing.fr.po \
   %D%/guix.fr.po
 
-- 
2.17.0

From 4a786d03f5810e06fafaa9ce01116dd079f7dfbd Mon Sep 17 00:00:00 2001
From: Julien Lepiller <[email-masked]>
Date: Sun, 29 Apr 2018 14:10:23 +0200
Subject: [PATCH 2/2] nls: Rename documentation pot files for the translation
 project.

* po/doc/guix.pot: Rename to...
* po/doc/guix-doc.pot: ...this.
* po/doc/contributing.pot: Rename to...
* po/doc/guix-contributing-doc.pot: ...this.
* po/doc/local.mk: Rename them.
* Makefile.am: Rename them.
---
 Makefile.am                                      |  2 +-
 ...ontributing.pot => guix-contributing-doc.pot} |  0
 po/doc/{guix.pot => guix-doc.pot}                |  0
 po/doc/local.mk                                  | 16 ++++++++--------
 4 files changed, 9 insertions(+), 9 deletions(-)
 rename po/doc/{contributing.pot => guix-contributing-doc.pot} (100%)
 rename po/doc/{guix.pot => guix-doc.pot} (100%)

diff --git a/Makefile.am b/Makefile.am
index b9950a24b..251bd320d 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -741,7 +741,7 @@ assert-no-store-file-names: $(distdir)/ChangeLog
 	     --exclude=*.info-[0-9] --exclude=*.dot				\
 	     --exclude=*.eps --exclude-dir=bootstrap				\
 	     --exclude=guix-prettify.el						\
-	     --exclude=guix.pot --exclude=guix.*.po						\
+	     --exclude=guix-doc.pot --exclude=guix.*.po				\
 	     --exclude=ChangeLog						\
 	     -E "$(storedir)/[a-z0-9]{32}-" $(distdir) ;			\
 	then									\
diff --git a/po/doc/contributing.pot b/po/doc/guix-contributing-doc.pot
similarity index 100%
rename from po/doc/contributing.pot
rename to po/doc/guix-contributing-doc.pot
diff --git a/po/doc/guix.pot b/po/doc/guix-doc.pot
similarity index 100%
rename from po/doc/guix.pot
rename to po/doc/guix-doc.pot
diff --git a/po/doc/local.mk b/po/doc/local.mk
index d104bfcbe..f0c158e08 100644
--- a/po/doc/local.mk
+++ b/po/doc/local.mk
@@ -17,8 +17,8 @@
 # along with GNU Guix.  If not, see <http://www.gnu.org/licenses/>.
 
 EXTRA_DIST = \
-  %D%/contributing.pot \
-  %D%/guix.pot \
+  %D%/guix-contributing-doc.pot \
+  %D%/guix-doc.pot \
   %D%/contributing.fr.po \
   %D%/guix.fr.po
 
@@ -26,7 +26,7 @@ POT_OPTIONS = --package-name "guix" --package-version "$(VERSION)" \
 	          --copyright-holder "Ludovic Courtès" \
 			  --msgid-bugs-address "[email-masked]"
 
-$(srcdir)/po/doc/guix.%.po: $(srcdir)/po/doc/guix.pot
+$(srcdir)/po/doc/guix.%.po: $(srcdir)/po/doc/guix-doc.pot
 	@lang=`echo $$(basename "$@") | sed -e 's|^guix.||' -e 's|.po$$||'` ;\
 	if test -f "$@"; then \
 	  test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
@@ -45,7 +45,7 @@ $(srcdir)/po/doc/guix.%.po: $(srcdir)/po/doc/guix.pot
 	     exit 1; \
 	fi
 
-$(srcdir)/po/doc/contributing.%.po: $(srcdir)/po/doc/contributing.pot
+$(srcdir)/po/doc/contributing.%.po: $(srcdir)/po/doc/guix-contributing-doc.pot
 	@lang=`echo $$(basename "$@") | sed -e 's|^contributing.||' -e 's|.po$$||'` ;\
 	if test -f "$@"; then \
 	  test "$(srcdir)" = . && cdcmd="" || cdcmd="cd $(srcdir) && "; \
@@ -64,16 +64,16 @@ $(srcdir)/po/doc/contributing.%.po: $(srcdir)/po/doc/contributing.pot
 	     exit 1; \
 	fi
 
-$(srcdir)/po/doc/contributing.pot-update: doc/contributing.texi
+$(srcdir)/po/doc/guix-contributing-doc.pot-update: doc/contributing.texi
 	$(AM_V_PO4A)$(PO4A_UPDATEPO) -M UTF-8 -f texinfo -m "$<" \
 		-p "$$(echo $@ | sed 's|-update||')" $(POT_OPTIONS)
 	@touch "$$(echo $@ | sed 's|-update||')"
 
-$(srcdir)/po/doc/guix.pot-update: doc/guix.texi
+$(srcdir)/po/doc/guix-doc.pot-update: doc/guix.texi
 	$(AM_V_PO4A)$(PO4A_UPDATEPO) -M UTF-8 -f texinfo -m "$<" \
 		-p "$$(echo $@ | sed 's|-update||')" $(POT_OPTIONS)
 	@touch "$$(echo $@ | sed 's|-update||')"
 
 doc-pot-update:
-	$(MAKE) $(srcdir)/po/doc/guix.pot-update
-	$(MAKE) $(srcdir)/po/doc/contributing.pot-update
+	$(MAKE) $(srcdir)/po/doc/guix-doc.pot-update
+	$(MAKE) $(srcdir)/po/doc/guix-contributing-doc.pot-update
-- 
2.17.0