* configure.in, man/po/Makefile.in.in, man/po/Makevars,
man/po/POTFILES.in, man/Makefile.am: Generate the PO files for the manpages in the man/po directory (instead of man/<lang>). Use a Makefile.in.in based on gettext's one. This ensure that the PO are generated before being used in the <lang> directories. * man/generate_mans.mak, man/generate_translations.mak, man/Makefile.am: New makefile for the generation of manpages from XML (generate_mans.mak). This avoid duplicate chunks in generate_translations.mak and Makefile.am * man/de/de.po, man/fr/fr.po, man/it/it.po, man/pl/pl.po, man/ru/ru.po, man/sv/sv.po: Moved to... * man/po/de.po, man/po/fr.po, man/po/it.po, man/po/pl.po, man/po/ru.po, man/po/sv.po: ... here.
This commit is contained in:
147
man/Makefile.am
147
man/Makefile.am
@@ -1,57 +1,12 @@
|
||||
|
||||
LINGUAS = de fr it pl ru sv
|
||||
|
||||
# subdirectories for translated manual pages
|
||||
DIST_SUBDIRS = cs de es fi fr hu id it ja ko pl pt_BR ru sv tr zh_CN zh_TW
|
||||
if USE_NLS
|
||||
SUBDIRS = $(DIST_SUBDIRS)
|
||||
SUBDIRS = po cs de es fi fr hu id it ja ko pl pt_BR ru sv tr zh_CN zh_TW
|
||||
else
|
||||
SUBDIRS =
|
||||
endif
|
||||
|
||||
man_XMANS = \
|
||||
chage.1.xml \
|
||||
chfn.1.xml \
|
||||
chgpasswd.8.xml \
|
||||
chpasswd.8.xml \
|
||||
chsh.1.xml \
|
||||
expiry.1.xml \
|
||||
faillog.5.xml \
|
||||
faillog.8.xml \
|
||||
gpasswd.1.xml \
|
||||
groupadd.8.xml \
|
||||
groupdel.8.xml \
|
||||
groupmems.8.xml \
|
||||
groupmod.8.xml \
|
||||
groups.1.xml \
|
||||
grpck.8.xml \
|
||||
gshadow.5.xml \
|
||||
lastlog.8.xml \
|
||||
limits.5.xml \
|
||||
login.1.xml \
|
||||
login.access.5.xml \
|
||||
login.defs.5.xml \
|
||||
logoutd.8.xml \
|
||||
newgrp.1.xml \
|
||||
newusers.8.xml \
|
||||
nologin.8.xml \
|
||||
passwd.1.xml \
|
||||
passwd.5.xml \
|
||||
porttime.5.xml \
|
||||
pwck.8.xml \
|
||||
pwconv.8.xml \
|
||||
shadow.3.xml \
|
||||
shadow.5.xml \
|
||||
sg.1.xml \
|
||||
su.1.xml \
|
||||
suauth.5.xml \
|
||||
useradd.8.xml \
|
||||
userdel.8.xml \
|
||||
usermod.8.xml \
|
||||
vipw.8.xml
|
||||
|
||||
man_MANS = \
|
||||
$(man_nopam) \
|
||||
chage.1 \
|
||||
chfn.1 \
|
||||
chgpasswd.8 \
|
||||
@@ -103,6 +58,47 @@ if !USE_PAM
|
||||
man_MANS += $(man_nopam)
|
||||
endif
|
||||
|
||||
man_XMANS = \
|
||||
chage.1.xml \
|
||||
chfn.1.xml \
|
||||
chgpasswd.8.xml \
|
||||
chpasswd.8.xml \
|
||||
chsh.1.xml \
|
||||
expiry.1.xml \
|
||||
faillog.5.xml \
|
||||
faillog.8.xml \
|
||||
gpasswd.1.xml \
|
||||
groupadd.8.xml \
|
||||
groupdel.8.xml \
|
||||
groupmems.8.xml \
|
||||
groupmod.8.xml \
|
||||
groups.1.xml \
|
||||
grpck.8.xml \
|
||||
gshadow.5.xml \
|
||||
lastlog.8.xml \
|
||||
limits.5.xml \
|
||||
login.1.xml \
|
||||
login.access.5.xml \
|
||||
login.defs.5.xml \
|
||||
logoutd.8.xml \
|
||||
newgrp.1.xml \
|
||||
newusers.8.xml \
|
||||
nologin.8.xml \
|
||||
passwd.1.xml \
|
||||
passwd.5.xml \
|
||||
porttime.5.xml \
|
||||
pwck.8.xml \
|
||||
pwconv.8.xml \
|
||||
shadow.3.xml \
|
||||
shadow.5.xml \
|
||||
sg.1.xml \
|
||||
su.1.xml \
|
||||
suauth.5.xml \
|
||||
useradd.8.xml \
|
||||
userdel.8.xml \
|
||||
usermod.8.xml \
|
||||
vipw.8.xml
|
||||
|
||||
EXTRA_DIST = \
|
||||
$(man_MANS) \
|
||||
$(man_XMANS) \
|
||||
@@ -110,67 +106,16 @@ EXTRA_DIST = \
|
||||
id.1 \
|
||||
id.1.xml \
|
||||
sulogin.8 \
|
||||
sulogin.8.xml
|
||||
sulogin.8.xml \
|
||||
generate_mans.mak \
|
||||
generate_translations.mak
|
||||
|
||||
if ENABLE_REGENERATE_MAN
|
||||
|
||||
if USE_PAM
|
||||
PAM_COND=pam
|
||||
else
|
||||
PAM_COND=no_pam
|
||||
endif
|
||||
|
||||
if SHADOWGRP
|
||||
SHADOWGRP_COND=gshadow
|
||||
else
|
||||
SHADOWGRP_COND=no_gshadow
|
||||
endif
|
||||
|
||||
%: %.xml
|
||||
$(XSLTPROC) --stringparam profile.condition "$(PAM_COND);$(SHADOWGRP_COND)" \
|
||||
-nonet http://docbook.sourceforge.net/release/xsl/current/manpages/profile-docbook.xsl $<
|
||||
|
||||
grpconv.8 grpunconv.8 pwunconv.8: pwconv.8
|
||||
|
||||
getspnam.3: shadow.3
|
||||
|
||||
vigr.8: vipw.8
|
||||
include generate_mans.mak
|
||||
|
||||
CLEANFILES = $(man_MANS)
|
||||
|
||||
POFILES = $(foreach lang, $(LINGUAS), $(lang)/$(lang).po)
|
||||
|
||||
all: $(POFILES)
|
||||
|
||||
$(POFILES): shadow-man-pages.pot
|
||||
|
||||
shadow-man-pages.pot: $(man_XMANS)
|
||||
|
||||
dist-hook: dist-po-files
|
||||
|
||||
.PHONY: dist-po-files
|
||||
dist-po-files: $(POFILES) shadow-man-pages.pot
|
||||
@for lang in $(LINGUAS); do \
|
||||
echo " $(mkinstalldirs) $(distdir)/$$lang"; \
|
||||
$(mkinstalldirs) "$(distdir)/$$lang"; \
|
||||
done
|
||||
@for file in $(POFILES); do \
|
||||
echo "$(INSTALL_DATA) $(srcdir)/$$file $(distdir)/$$file"; \
|
||||
$(INSTALL_DATA) "$(srcdir)/$$file" "$(distdir)/$$file"; \
|
||||
done
|
||||
$(INSTALL_DATA) "$(srcdir)/shadow-man-pages.pot" "$(distdir)/shadow-man-pages.pot"
|
||||
|
||||
shadow-man-pages.pot: $(man_XMANS)
|
||||
xml2po -o $@ $(man_XMANS)
|
||||
|
||||
.PHONY: update-po
|
||||
update-po: shadow-man-pages.pot
|
||||
@for lang in $(LINGUAS); do \
|
||||
echo "$$lang:"; \
|
||||
echo "$(MSGMERGE) -o $$lang/$$lang.po $$lang/$$lang.po shadow-man-pages.pot"; \
|
||||
$(MSGMERGE) -o $$lang/$$lang.po $$lang/$$lang.po shadow-man-pages.pot; \
|
||||
done
|
||||
|
||||
else
|
||||
$(man_MANS):
|
||||
@echo ""
|
||||
|
Reference in New Issue
Block a user