Déjà Dup Backup Tool

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
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: mp+92701@code.launchpad.net

Description of the Change

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.

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

Nice, thanks!

review: Approve

Preview Diff

1=== modified file 'man/Makefile.am'
2--- man/Makefile.am 2011-06-28 15:48:17 +0000
3+++ man/Makefile.am 2012-02-13 02:00:25 +0000
4@@ -17,9 +17,18 @@
5 # along with Déjà Dup. If not, see <http://www.gnu.org/licenses/>.
6
7 # Here's a bunch of translation support. Some stolen from dpkg
8-
9-POLINGUAS = $(shell grep -v "^\#" $(top_srcdir)/po/LINGUAS)
10-MAN_LINGUAS = C $(POLINGUAS)
11+# and intltool.
12+
13+ALL_LINGUAS = @ALL_LINGUAS@
14+
15+PO_LINGUAS=$(shell if test -r $(top_srcdir)/po/LINGUAS; then grep -v "^\#" $(top_srcdir)/po/LINGUAS; else echo "$(ALL_LINGUAS)"; fi)
16+
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)
18+
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)
20+
21+MAN_LINGUAS = C $(USE_LINGUAS)
22+
23
24 PAGES = deja-dup.1 deja-dup-preferences.1
25
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 \

Subscribers

People subscribed via source and target branches