build: Set the XSL parameter through the command line instead of sed
authorGuillem Jover <guillem@debian.org>
Wed, 2 Jul 2014 23:56:52 +0000 (01:56 +0200)
committerMichael Vogt <mvo@debian.org>
Tue, 8 Jul 2014 11:14:04 +0000 (13:14 +0200)
Use the xsltproc --stringparam option instead of replacing it inside the
file.

buildlib/po4a_manpage.mak
doc/manpage-style.xsl

index b3d586b..62ada19 100644 (file)
@@ -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),,$@) $@
 
index 5cb6a58..a780bad 100644 (file)
@@ -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>