* man/generate_translations.mak: Generic rules for all the

generated translated manpages (if ENABLE_REGENERATE_MAN).
* man/Makefile.am: Removed rules for all the generated translated
  manpages.
* man/sv/Makefile.am, man/de/Makefile.am, man/fr/Makefile.am,
  man/pl/Makefile.am, man/ru/Makefile.am, man/it/Makefile.am:
  Include generate_translations.mak to handle the generated
  translations (XML and roff files).
* man/Makefile.am: Translated XML files moved from the CLEANFILES
  variable of man/Makefile.am to the various languages Makefiles.
This commit is contained in:
nekral-guest 2007-11-17 18:45:22 +00:00
parent a9f2f60c68
commit cbb2911b7f
9 changed files with 49 additions and 9 deletions

View File

@ -13,6 +13,16 @@
* man/Makefile.am: Replace the individual rules for the generation * man/Makefile.am: Replace the individual rules for the generation
of the manpages (from XML) by a generic Makefile rule an of the manpages (from XML) by a generic Makefile rule an
dependencies for the linked manpages. dependencies for the linked manpages.
* man/generate_translations.mak: Generic rules for all the
generated translated manpages (if ENABLE_REGENERATE_MAN).
* man/Makefile.am: Removed rules for all the generated translated
manpages.
* man/sv/Makefile.am, man/de/Makefile.am, man/fr/Makefile.am,
man/pl/Makefile.am, man/ru/Makefile.am, man/it/Makefile.am:
Include generate_translations.mak to handle the generated
translations (XML and roff files).
* man/Makefile.am: Translated XML files moved from the CLEANFILES
variable of man/Makefile.am to the various languages Makefiles.
2007-11-17 Nicolas François <nicolas.francois@centraliens.net> 2007-11-17 Nicolas François <nicolas.francois@centraliens.net>

View File

@ -123,18 +123,11 @@ getspnam.3: shadow.3
vigr.8: vipw.8 vigr.8: vipw.8
CLEANFILES = $(man_MANS) $(ALL_TRANSLATED_XMLS) CLEANFILES = $(man_MANS)
POFILES = $(foreach lang, $(LINGUAS), $(lang)/$(lang).po) POFILES = $(foreach lang, $(LINGUAS), $(lang)/$(lang).po)
ALL_TRANSLATED_XMLS = $(foreach dir, $(LINGUAS), $(foreach xmlfile, $(man_XMANS), $(dir)/$(xmlfile)))
all: $(POFILES) $(ALL_TRANSLATED_XMLS) all: $(POFILES)
gen-xmls: $(ALL_TRANSLATED_XMLS)
$(ALL_TRANSLATED_XMLS): $(man_XMANS)
xml2po -l $(strip $(subst /,, $(dir $@))) -p $(strip $(subst /,, $(dir $@)))/$(strip $(subst /,, $(dir $@))).po -o $@ $(notdir $@)
sed -i 's:\(^<refentry .*\)>:\1 lang="$(strip $(subst /,, $(dir $@)))">:' $@
$(POFILES): shadow-man-pages.pot $(POFILES): shadow-man-pages.pot

View File

@ -13,3 +13,6 @@ man_MANS = \
vipw.8 vipw.8
EXTRA_DIST = $(man_MANS) EXTRA_DIST = $(man_MANS)
include ../generate_translations.mak

View File

@ -53,3 +53,6 @@ endif
EXTRA_DIST = \ EXTRA_DIST = \
$(man_MANS) \ $(man_MANS) \
$(man_nopam) $(man_nopam)
include ../generate_translations.mak

View File

@ -0,0 +1,20 @@
if ENABLE_REGENERATE_MAN
LANG=$(notdir $(CURDIR))
%.xml: ../%.xml $(LANG).po
xml2po -l $(LANG) -p $(LANG).po -o $@ ../$@
sed -i 's:\(^<refentry .*\)>:\1 lang="$(LANG)">:' $@
%: %.xml
$(XSLTPROC) -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
grpconv.8 grpunconv.8 pwunconv.8: pwconv.8
getspnam.3: shadow.3
vigr.8: vipw.8
CLEANFILES = .xml2po.mo $(man_MANS) $(addsuffix .xml,$(man_MANS))
endif

View File

@ -49,3 +49,5 @@ EXTRA_DIST = \
$(man_nopam) \ $(man_nopam) \
id.1 id.1
include ../generate_translations.mak

View File

@ -54,3 +54,6 @@ EXTRA_DIST = \
id.1 \ id.1 \
shadow.3 \ shadow.3 \
sulogin.8 sulogin.8
include ../generate_translations.mak

View File

@ -58,3 +58,6 @@ EXTRA_DIST = \
$(man_nopam) \ $(man_nopam) \
id.1 \ id.1 \
sulogin.8 sulogin.8
include ../generate_translations.mak

View File

@ -55,3 +55,6 @@ endif
EXTRA_DIST = \ EXTRA_DIST = \
$(man_MANS) \ $(man_MANS) \
$(man_nopam) $(man_nopam)
include ../generate_translations.mak