* man/generate_translations.mak, man/generate_mans.mak: Fix

distcheck. All manpages generation code shall be enclosed in
	ENABLE_REGENERATE_MAN conditions.
This commit is contained in:
nekral-guest 2010-03-20 10:25:34 +00:00
parent 9b6beb496a
commit d1eae4c7e3
3 changed files with 18 additions and 9 deletions

View File

@ -1,3 +1,9 @@
2010-03-20 Nicolas François <nicolas.francois@centraliens.net>
* man/generate_translations.mak, man/generate_mans.mak: Fix
distcheck. All manpages generation code shall be enclosed in
ENABLE_REGENERATE_MAN conditions.
2010-03-20 Nicolas François <nicolas.francois@centraliens.net> 2010-03-20 Nicolas François <nicolas.francois@centraliens.net>
* man/useradd.8.xml: Do not document the features which are not * man/useradd.8.xml: Do not document the features which are not

View File

@ -20,14 +20,15 @@ else
SHA_CRYPT_COND=no_sha_crypt SHA_CRYPT_COND=no_sha_crypt
endif endif
if ENABLE_REGENERATE_MAN
%.xml-config: %.xml Makefile %.xml-config: %.xml Makefile
sed -e 's/^<!-- SHADOW-CONFIG-HERE -->/<!ENTITY % config SYSTEM "config.xml">%config;/' $< > $@ sed -e 's/^<!-- SHADOW-CONFIG-HERE -->/<!ENTITY % config SYSTEM "config.xml">%config;/' $< > $@
%: %.xml-config Makefile config.xml %: %.xml-config Makefile config.xml
if ENABLE_REGENERATE_MAN
$(XSLTPROC) --stringparam profile.condition "$(PAM_COND);$(SHADOWGRP_COND);$(TCB_COND);$(SHA_CRYPT_COND)" \ $(XSLTPROC) --stringparam profile.condition "$(PAM_COND);$(SHADOWGRP_COND);$(TCB_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 else
$(man_MANS):
@echo you need to run configure with --enable-man to generate man pages @echo you need to run configure with --enable-man to generate man pages
@false @false
endif endif

View File

@ -1,18 +1,20 @@
LANG=$(notdir $(CURDIR)) LANG=$(notdir $(CURDIR))
%.xml: ../%.xml ../po/$(LANG).po
if ENABLE_REGENERATE_MAN if ENABLE_REGENERATE_MAN
xml2po --expand-all-entities -l $(LANG) -p ../po/$(LANG).po -o $@ ../$@
sed -i 's:\(^<refentry .*\)>:\1 lang="$(LANG)">:' $@
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 $@
%.xml: ../%.xml ../po/$(LANG).po
xml2po --expand-all-entities -l $(LANG) -p ../po/$(LANG).po -o $@ ../$@
sed -i 's:\(^<refentry .*\)>:\1 lang="$(LANG)">:' $@
include ../generate_mans.mak include ../generate_mans.mak
else
$(man_MANS):
@echo you need to run configure with --enable-man to generate man pages
@false
endif
CLEANFILES = .xml2po.mo $(EXTRA_DIST) $(addsuffix .xml,$(EXTRA_DIST)) CLEANFILES = .xml2po.mo $(EXTRA_DIST) $(addsuffix .xml,$(EXTRA_DIST))