← Back to team overview

deja-dup-team team mailing list archive

[Merge] lp:~tetromino/deja-dup/linguas into lp:deja-dup

 

Alexandre Rostovtsev has proposed merging lp:~tetromino/deja-dup/linguas into lp:deja-dup.

Requested reviews:
  Déjà Dup Developers (deja-dup-hackers)

For more details, see:
https://code.launchpad.net/~tetromino/deja-dup/linguas/+merge/92701

This merge proposal is to fix an issue originally reported in https://bugs.gentoo.org/show_bug.cgi?id=402677

intltool-using applications are expected to honor the LINGUAS environment variable when configuring and building from source. For example, if LINGUAS="en ru", then only the English and Russian versions of translated messages, schemas, help files, man pages, etc. should be built.

For the most part, deja-dup's build system does honor LINGUAS. The exception is man page generation; if LINGUAS is set to a subset of languages available in po/LINGUAS, the build will simply fail during make install:

make[2]: Entering directory `/var/tmp/portage/app-backup/deja-dup-21.2-r1/work/deja-dup-21.2/man'
make[2]: Nothing to be done for `install-exec-am'.
make[2]: *** No rule to make target `ar/stamp', needed by `man'.  Stop.

This branch fixes the problem with a patch to use the logic from intltool's Makefile.in.in to calculate the set of languages for which man pages should be built.
-- 
https://code.launchpad.net/~tetromino/deja-dup/linguas/+merge/92701
Your team Déjà Dup Developers is requested to review the proposed merge of lp:~tetromino/deja-dup/linguas into lp:deja-dup.
=== modified file 'man/Makefile.am'
--- man/Makefile.am	2011-06-28 15:48:17 +0000
+++ man/Makefile.am	2012-02-13 02:00:25 +0000
@@ -17,9 +17,18 @@
 # along with Déjà Dup.  If not, see <http://www.gnu.org/licenses/>.
 
 # Here's a bunch of translation support.  Some stolen from dpkg
-
-POLINGUAS = $(shell grep -v "^\#" $(top_srcdir)/po/LINGUAS)
-MAN_LINGUAS = C $(POLINGUAS)
+# and intltool.
+
+ALL_LINGUAS = @ALL_LINGUAS@
+
+PO_LINGUAS=$(shell if test -r $(top_srcdir)/po/LINGUAS; then grep -v "^\#" $(top_srcdir)/po/LINGUAS; else echo "$(ALL_LINGUAS)"; fi)
+
+USER_LINGUAS=$(shell if test -n "$(LINGUAS)"; then LLINGUAS="$(LINGUAS)"; ALINGUAS="$(ALL_LINGUAS)"; for lang in $$LLINGUAS; do if test -n "`grep \^$$lang$$ $(top_srcdir)/po/LINGUAS 2>/dev/null`" -o -n "`echo $$ALINGUAS|tr ' ' '\n'|grep \^$$lang$$`"; then printf "$$lang "; fi; done; fi)
+
+USE_LINGUAS=$(shell if test -n "$(USER_LINGUAS)" -o -n "$(LINGUAS)"; then LLINGUAS="$(USER_LINGUAS)"; else if test -n "$(PO_LINGUAS)"; then LLINGUAS="$(PO_LINGUAS)"; else LLINGUAS="$(ALL_LINGUAS)"; fi; fi; for lang in $$LLINGUAS; do printf "$$lang "; done)
+
+MAN_LINGUAS = C $(USE_LINGUAS)
+
 
 PAGES = deja-dup.1 deja-dup-preferences.1
 
@@ -52,7 +61,7 @@
 install-data-local: install-data-local-@USE_NLS@
 install-data-local-no:
 install-data-local-yes: man
-	for lang in $(POLINGUAS); do \
+	for lang in $(USE_LINGUAS); do \
 		$(mkinstalldirs) "$(DESTDIR)$(mandir)/$$lang/man1"; \
 		$(INSTALL_DATA) $$lang/*.1 "$(DESTDIR)$(mandir)/$$lang/man1"; \
 	done
@@ -62,7 +71,7 @@
 uninstall-local: uninstall-local-@USE_NLS@
 uninstall-local-no:
 uninstall-local-yes: man
-	for lang in $(POLINGUAS); do \
+	for lang in $(USE_LINGUAS); do \
 		for file in $(PAGES); do \
 			rm -f "$(DESTDIR)$(mandir)/$$lang/man1/$$file"; \
 		done \


Follow ups