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

Proposed by Alexandre Rostovtsev
Status: Merged
Approved by: Michael Terry
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/Makefile.am (+14/-5)
To merge this branch: bzr merge lp:~tetromino/deja-dup/linguas
Reviewer Review Type Date Requested Status
Michael Terry Approve
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.
Revision history for this message
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
=== 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 @@
17# along with Déjà Dup. If not, see <http://www.gnu.org/licenses/>.17# along with Déjà Dup. If not, see <http://www.gnu.org/licenses/>.
1818
19# Here's a bunch of translation support. Some stolen from dpkg19# Here's a bunch of translation support. Some stolen from dpkg
2020# and intltool.
21POLINGUAS = $(shell grep -v "^\#" $(top_srcdir)/po/LINGUAS)21
22MAN_LINGUAS = C $(POLINGUAS)22ALL_LINGUAS = @ALL_LINGUAS@
23
24PO_LINGUAS=$(shell if test -r $(top_srcdir)/po/LINGUAS; then grep -v "^\#" $(top_srcdir)/po/LINGUAS; else echo "$(ALL_LINGUAS)"; fi)
25
26USER_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)
27
28USE_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)
29
30MAN_LINGUAS = C $(USE_LINGUAS)
31
2332
24PAGES = deja-dup.1 deja-dup-preferences.133PAGES = deja-dup.1 deja-dup-preferences.1
2534
@@ -52,7 +61,7 @@
52install-data-local: install-data-local-@USE_NLS@61install-data-local: install-data-local-@USE_NLS@
53install-data-local-no:62install-data-local-no:
54install-data-local-yes: man63install-data-local-yes: man
55 for lang in $(POLINGUAS); do \64 for lang in $(USE_LINGUAS); do \
56 $(mkinstalldirs) "$(DESTDIR)$(mandir)/$$lang/man1"; \65 $(mkinstalldirs) "$(DESTDIR)$(mandir)/$$lang/man1"; \
57 $(INSTALL_DATA) $$lang/*.1 "$(DESTDIR)$(mandir)/$$lang/man1"; \66 $(INSTALL_DATA) $$lang/*.1 "$(DESTDIR)$(mandir)/$$lang/man1"; \
58 done67 done
@@ -62,7 +71,7 @@
62uninstall-local: uninstall-local-@USE_NLS@71uninstall-local: uninstall-local-@USE_NLS@
63uninstall-local-no:72uninstall-local-no:
64uninstall-local-yes: man73uninstall-local-yes: man
65 for lang in $(POLINGUAS); do \74 for lang in $(USE_LINGUAS); do \
66 for file in $(PAGES); do \75 for file in $(PAGES); do \
67 rm -f "$(DESTDIR)$(mandir)/$$lang/man1/$$file"; \76 rm -f "$(DESTDIR)$(mandir)/$$lang/man1/$$file"; \
68 done \77 done \

Subscribers

People subscribed via source and target branches