From 4146add2bc50ce7be708a94c763015046c60726a Mon Sep 17 00:00:00 2001 From: Brendan O'Dea Date: Mon, 8 Jun 2015 20:09:54 +1000 Subject: Set document language for localised info pages --- Makefile.in | 11 +++++++---- 1 file changed, 7 insertions(+), 4 deletions(-) (limited to 'Makefile.in') 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 -- cgit v1.2.1