summaryrefslogtreecommitdiff
path: root/Makefile.in
diff options
context:
space:
mode:
authorBrendan O'Dea <bod@debian.org>2015-06-08 20:09:54 +1000
committerBrendan O'Dea <bod@debian.org>2015-06-08 20:09:54 +1000
commit4146add2bc50ce7be708a94c763015046c60726a (patch)
tree507f91e83b39dc34d8bebf785ca240f7eb2b9600 /Makefile.in
parent53f294e0f6bd8ccb94189eeb5b4f3de26c0908bd (diff)
downloadhelp2man-4146add2bc50ce7be708a94c763015046c60726a.tar.gz
Set document language for localised info pages
Diffstat (limited to 'Makefile.in')
-rw-r--r--Makefile.in11
1 files changed, 7 insertions, 4 deletions
diff --git a/Makefile.in b/Makefile.in
index bd5d18d..52ac86f 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -33,13 +33,14 @@ LINGUAS_TEXI = $(basename $(notdir $(wildcard $(srcdir)/po-texi/*.po)))
CC = @CC@
PERL = @PERL@
LIBS = @LIBS@
-FIND_VPATH = $(auxdir)/find-vpath
+FIND_VPATH = $(auxdir)/find-vpath # locate a file in $VPATH
MKINSTALLDIRS = $(auxdir)/mkinstalldirs
INSTALL = @INSTALL@
INSTALL_PROGRAM = @INSTALL_PROGRAM@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_INFO = @INSTALL_INFO@
+LOOKUP_LOCALE = $(auxdir)/lookup-locale # get full locale from extension
MAKEINFO = @MAKEINFO@
MSGFMT = @MSGFMT@
XGETTEXT = @XGETTEXT@
@@ -174,8 +175,7 @@ $(target).%.1: $(srcdir)/$(target).PL $(srcdir)/$(target).h2m.PL \
$(target).%.h2m: $(srcdir)/$(target).h2m.PL $(srcdir)/po/%.po
set -e; \
lang=$(patsubst $(target).%.h2m,%,$@); \
- locale=$$(echo $$lang $$lang | \
- sed -n "/^$$lang"'\s/{s/^\S\+\s\+//p; q}' $(srcdir)/locales -); \
+ locale=$$($(LOOKUP_LOCALE) $$lang $(srcdir)/locales); \
$(MAKE) localetmp/$$lang/LC_MESSAGES/$(target).mo; \
$(PERL) $(srcdir)/$(target).h2m.PL --locale="$$locale" \
--message-dir=localetmp --output=$@
@@ -186,7 +186,10 @@ $(target).info: $(srcdir)/$(target).texi
info_l10n: $(addprefix $(target)-,$(addsuffix .info,$(LINGUAS_TEXI)))
$(target)-%.info: $(target)-%.texi
- $(MAKEINFO) $? -o $@.tmp
+ set -e; \
+ lang=$(patsubst $(target)-%.info,%,$@); \
+ locale=$$($(LOOKUP_LOCALE) $$lang $(srcdir)/locales); \
+ $(MAKEINFO) --output=$@.tmp --document-language="$$locale" $?
$(FIXUP_TEXI_TRANS) -o $@ $@.tmp
rm -f $@.tmp