MSYS2 build: respect MINGW_PREFIX when resolving DOCBOOK_ROOT

This commit is contained in:
fauxpark 2022-07-26 16:51:23 +10:00
parent 4e1f0c89b7
commit 13578d21d4
2 changed files with 6 additions and 9 deletions

View File

@ -464,11 +464,6 @@ rule '.1' => '.xml' do |t|
stylesheet = "#{c(:DOCBOOK_ROOT)}/manpages/docbook.xsl"
if !FileTest.exists?(stylesheet)
puts "Error: the DocBook stylesheet '#{stylesheet}' does not exist."
exit 1
end
runq "xsltproc", t.source, "#{c(:XSLTPROC)} #{c(:XSLTPROC_FLAGS)} -o #{t.name} #{stylesheet} #{t.sources.join(" ")}", :filter_output => filter
end

View File

@ -8,10 +8,12 @@ if ! test -z "$DOCBOOK_ROOT"; then
else
AC_MSG_CHECKING([for DocBook XSL root directory])
for i in `ls -d /usr/share/xml/docbook/xsl-stylesheets*-nons 2> /dev/null` \
/usr/share/xml/docbook/stylesheet/xsl/nwalsh \
/usr/share/xml/docbook/stylesheet/nwalsh \
`ls -d /usr/share/sgml/docbook/xsl-stylesheets* /usr/share/xml/docbook/xsl-stylesheets* 2> /dev/null` \
PREFIX_FOR_XSL=${MINGW_PREFIX:-/usr}
for i in `ls -d $PREFIX_FOR_XSL/share/xml/docbook/xsl-stylesheets*-nons 2> /dev/null` \
$PREFIX_FOR_XSL/share/xml/docbook/stylesheet/xsl/nwalsh \
$PREFIX_FOR_XSL/share/xml/docbook/stylesheet/nwalsh \
`ls -d $PREFIX_FOR_XSL/share/sgml/docbook/xsl-stylesheets* $PREFIX_FOR_XSL/share/xml/docbook/xsl-stylesheets* 2> /dev/null` \
; do
if test -f "$i/manpages/docbook.xsl"; then
DOCBOOK_ROOT="$i"