summaryrefslogtreecommitdiff
path: root/buildlib/po4a_manpage.mak
diff options
context:
space:
mode:
Diffstat (limited to 'buildlib/po4a_manpage.mak')
-rw-r--r--buildlib/po4a_manpage.mak12
1 files changed, 9 insertions, 3 deletions
diff --git a/buildlib/po4a_manpage.mak b/buildlib/po4a_manpage.mak
index 404bb57a5..09eca0ec2 100644
--- a/buildlib/po4a_manpage.mak
+++ b/buildlib/po4a_manpage.mak
@@ -13,22 +13,28 @@
SOURCE = $(patsubst %.xml,%,$(wildcard *.$(LC).?.xml))
INCLUDES = apt.ent apt-verbatim.ent
+manpages:
+
# Do not use XMLTO, build the manpages directly with XSLTPROC
ifdef XSLTPROC
-STYLESHEET=../manpage-style.xsl
+STYLESHEET=manpage-style.xsl
LOCAL := po4a-manpage-$(firstword $(SOURCE))
$(LOCAL)-LIST := $(SOURCE)
# Install generation hooks
-doc: $($(LOCAL)-LIST)
+manpages: $($(LOCAL)-LIST)
veryclean: veryclean/$(LOCAL)
apt-verbatim.ent: ../apt-verbatim.ent
cp ../apt-verbatim.ent .
-$($(LOCAL)-LIST) :: % : %.xml $(INCLUDES)
+manpage-style.xsl: ../manpage-style.xsl
+ sed "/<!-- LANGUAGE -->/ i\
+<xsl:param name=\"l10n.gentext.default.language\" select=\"'$(LC)'\" />" ../manpage-style.xsl > manpage-style.xsl
+
+$($(LOCAL)-LIST) :: % : %.xml $(STYLESHEET) $(INCLUDES)
echo Creating man page $@
$(XSLTPROC) -o $@ $(STYLESHEET) $< || exit 200 # why xsltproc doesn't respect the -o flag here???
test -f $(subst .$(LC),,$@) || echo FIXME: xsltproc respect the -o flag now, workaround can be removed