From: Guillem Jover Date: Wed, 2 Jul 2014 23:56:52 +0000 (+0200) Subject: build: Set the XSL parameter through the command line instead of sed X-Git-Tag: 1.0.6~6 X-Git-Url: https://git.saurik.com/apt.git/commitdiff_plain/05ccc2a5b201a76c0a76e9910abb7b3229e7b079?ds=inline build: Set the XSL parameter through the command line instead of sed Use the xsltproc --stringparam option instead of replacing it inside the file. --- diff --git a/buildlib/po4a_manpage.mak b/buildlib/po4a_manpage.mak index b3d586b2f..62ada1969 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 "// i\ -" ../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 5cb6a58c2..a780bad13 100644 --- a/doc/manpage-style.xsl +++ b/doc/manpage-style.xsl @@ -5,7 +5,6 @@ - <>