diff --git a/Rakefile b/Rakefile index 7679fa4bc..f8832ec5e 100644 --- a/Rakefile +++ b/Rakefile @@ -317,7 +317,14 @@ rule '.1' => '.xml' do |t| result end - runq "xsltproc", t.source, "#{c(:XSLTPROC)} #{c(:XSLTPROC_FLAGS)} -o #{t.name} #{c(:DOCBOOK_ROOT)}/manpages/docbook.xsl #{t.sources.join(" ")}", :filter_output => filter + 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 $manpages.each do |manpage|