* man/generate_mans.mak, man/generate_translations.mak: Provide an

useful error message when --enable-man is not enabled and the
	translated manpages are not generated.
This commit is contained in:
nekral-guest 2009-08-30 19:46:54 +00:00
parent 9031103c24
commit 915e78ee2d
3 changed files with 17 additions and 9 deletions

View File

@ -1,3 +1,9 @@
2009-08-30 Mike Frysinger <vapier@gentoo.org>
* man/generate_mans.mak, man/generate_translations.mak: Provide an
useful error message when --enable-man is not enabled and the
translated manpages are not generated.
2009-08-21 Nicolas François <nicolas.francois@centraliens.net> 2009-08-21 Nicolas François <nicolas.francois@centraliens.net>
* man/login.defs.d/ENCRYPT_METHOD.xml: Avoid using sub-lists. They * man/login.defs.d/ENCRYPT_METHOD.xml: Avoid using sub-lists. They

View File

@ -1,5 +1,3 @@
if ENABLE_REGENERATE_MAN
if USE_PAM if USE_PAM
PAM_COND=pam PAM_COND=pam
else else
@ -18,13 +16,16 @@ SHA_CRYPT_COND=no_sha_crypt
endif endif
%: %.xml Makefile config.xml %: %.xml Makefile config.xml
if ENABLE_REGENERATE_MAN
$(XSLTPROC) --stringparam profile.condition "$(PAM_COND);$(SHADOWGRP_COND);$(SHA_CRYPT_COND)" \ $(XSLTPROC) --stringparam profile.condition "$(PAM_COND);$(SHADOWGRP_COND);$(SHA_CRYPT_COND)" \
-nonet http://docbook.sourceforge.net/release/xsl/current/manpages/profile-docbook.xsl $< -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/profile-docbook.xsl $<
else
@echo you need to run configure with --enable-man to generate man pages
@false
endif
grpconv.8 grpunconv.8 pwunconv.8: pwconv.8 grpconv.8 grpunconv.8 pwunconv.8: pwconv.8
getspnam.3: shadow.3 getspnam.3: shadow.3
vigr.8: vipw.8 vigr.8: vipw.8
endif

View File

@ -1,20 +1,21 @@
if ENABLE_REGENERATE_MAN
LANG=$(notdir $(CURDIR)) LANG=$(notdir $(CURDIR))
%.xml: ../%.xml ../po/$(LANG).po %.xml: ../%.xml ../po/$(LANG).po
if ENABLE_REGENERATE_MAN
[ ! -f ../config.xml ] || mv ../config.xml ../config.xml.bak [ ! -f ../config.xml ] || mv ../config.xml ../config.xml.bak
xml2po --expand-all-entities -l $(LANG) -p ../po/$(LANG).po -o $@ ../$@ xml2po --expand-all-entities -l $(LANG) -p ../po/$(LANG).po -o $@ ../$@
sed -i 's:\(^<refentry .*\)>:\1 lang="$(LANG)">:' $@ sed -i 's:\(^<refentry .*\)>:\1 lang="$(LANG)">:' $@
[ ! -f ../config.xml.bak ] || mv ../config.xml.bak ../config.xml [ ! -f ../config.xml.bak ] || mv ../config.xml.bak ../config.xml
sed -i 's/config SYSTEM "config.xml">/config SYSTEM "config.xml">\%config;/' $@ sed -i 's/config SYSTEM "config.xml">/config SYSTEM "config.xml">\%config;/' $@
else
@echo you need to run configure with --enable-man to generate man pages
@false
endif
config.xml: ../config.xml.in config.xml: ../config.xml.in
make -C .. config.xml $(MAKE) -C .. config.xml
cp ../config.xml $@ cp ../config.xml $@
include ../generate_mans.mak include ../generate_mans.mak
CLEANFILES = .xml2po.mo $(EXTRA_DIST) $(addsuffix .xml,$(EXTRA_DIST)) CLEANFILES = .xml2po.mo $(EXTRA_DIST) $(addsuffix .xml,$(EXTRA_DIST))
endif