Merge lp:~tetromino/deja-dup/linguas into lp:deja-dup/22

Proposed by Alexandre Rostovtsev on 2012-02-13
Status: Merged
Approved by: Michael Terry on 2012-02-21
Approved revision: 1289
Merged at revision: 1291
Proposed branch: lp:~tetromino/deja-dup/linguas
Merge into: lp:deja-dup/22
Diff against target: 43 lines (+14/-5)
1 file modified
man/ (+14/-5)
To merge this branch: bzr merge lp:~tetromino/deja-dup/linguas
Reviewer Review Type Date Requested Status
Michael Terry 2012-02-13 Approve on 2012-02-21
Review via email:

Description of the change

This merge proposal is to fix an issue originally reported in

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 to calculate the set of languages for which man pages should be built.

To post a comment you must log in.
Michael Terry (mterry) wrote :

Nice, thanks!

review: Approve

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'man/'
2--- man/ 2011-06-28 15:48:17 +0000
3+++ man/ 2012-02-13 02:00:25 +0000
4@@ -17,9 +17,18 @@
5 # along with Déjà Dup. If not, see <>.
7 # Here's a bunch of translation support. Some stolen from dpkg
9-POLINGUAS = $(shell grep -v "^\#" $(top_srcdir)/po/LINGUAS)
11+# and intltool.
15+PO_LINGUAS=$(shell if test -r $(top_srcdir)/po/LINGUAS; then grep -v "^\#" $(top_srcdir)/po/LINGUAS; else echo "$(ALL_LINGUAS)"; fi)
17+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)
19+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)
24 PAGES = deja-dup.1 deja-dup-preferences.1
26@@ -52,7 +61,7 @@
27 install-data-local: install-data-local-@USE_NLS@
28 install-data-local-no:
29 install-data-local-yes: man
30- for lang in $(POLINGUAS); do \
31+ for lang in $(USE_LINGUAS); do \
32 $(mkinstalldirs) "$(DESTDIR)$(mandir)/$$lang/man1"; \
33 $(INSTALL_DATA) $$lang/*.1 "$(DESTDIR)$(mandir)/$$lang/man1"; \
34 done
35@@ -62,7 +71,7 @@
36 uninstall-local: uninstall-local-@USE_NLS@
37 uninstall-local-no:
38 uninstall-local-yes: man
39- for lang in $(POLINGUAS); do \
40+ for lang in $(USE_LINGUAS); do \
41 for file in $(PAGES); do \
42 rm -f "$(DESTDIR)$(mandir)/$$lang/man1/$$file"; \
43 done \


People subscribed via source and target branches