summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGuillem Jover <guillem@debian.org>2014-07-03 01:56:52 +0200
committerMichael Vogt <mvo@debian.org>2014-07-08 13:14:04 +0200
commit05ccc2a5b201a76c0a76e9910abb7b3229e7b079 (patch)
treed0e7a194d9b962ca7b522353dc3461451aaf11c1
parent0c218f7ba6ac4facad2465bc65a6261ae2696a5c (diff)
downloadapt-05ccc2a5b201a76c0a76e9910abb7b3229e7b079.tar.gz
build: Set the XSL parameter through the command line instead of sed
Use the xsltproc --stringparam option instead of replacing it inside the file.
-rw-r--r--buildlib/po4a_manpage.mak7
-rw-r--r--doc/manpage-style.xsl1
2 files changed, 4 insertions, 4 deletions
diff --git a/buildlib/po4a_manpage.mak b/buildlib/po4a_manpage.mak
index b3d586b2..62ada196 100644
--- a/buildlib/po4a_manpage.mak
+++ b/buildlib/po4a_manpage.mak
@@ -35,12 +35,13 @@ apt-vendor.ent: ../apt-vendor.ent
cp -a ../apt-vendor.ent .
manpage-style.xsl: ../manpage-style.xsl
- sed "/<!-- LANGUAGE -->/ i\
-<xsl:param name=\"l10n.gentext.default.language\" select=\"'$(LC)'\" />" ../manpage-style.xsl > manpage-style.xsl
+ cp -a $< .
$($(LOCAL)-LIST) :: % : %.xml $(STYLESHEET) $(INCLUDES)
echo Creating man page $@
- $(XSLTPROC) -o $@ $(STYLESHEET) $< || exit 200 # why xsltproc doesn't respect the -o flag here???
+ $(XSLTPROC) \
+ --stringparam l10n.gentext.default.language $(LC) \
+ -o $@ $(STYLESHEET) $< || exit 200 # why xsltproc doesn't respect the -o flag here???
test -f $(subst .$(LC),,$@) || echo 'FIXME: xsltproc respects the -o flag now, workaround can be removed'
mv -f $(subst .$(LC),,$@) $@
diff --git a/doc/manpage-style.xsl b/doc/manpage-style.xsl
index 5cb6a58c..a780bad1 100644
--- a/doc/manpage-style.xsl
+++ b/doc/manpage-style.xsl
@@ -5,7 +5,6 @@
<xsl:import href="/usr/share/xml/docbook/stylesheet/nwalsh/manpages/docbook.xsl" />
<xsl:param name="man.output.encoding" select="'UTF-8'" />
-<!-- LANGUAGE -->
<xsl:template match="email">&lt;<xsl:apply-templates/>&gt;</xsl:template>