+spec.xml: spec.xfpt
+ xfpt spec.xfpt
+
+spec-pr.xml: spec.xml Pre-xml
+ ./Pre-xml -optbreak <spec.xml >spec-pr.xml
+
+spec-txt.xml: spec.xml Pre-xml
+ ./Pre-xml -ascii -html -noindex -quoteliteral \
+ <spec.xml >spec-txt.xml
+
+spec-info.xml: spec.xml Pre-xml
+ ./Pre-xml -ascii -html -noindex <spec.xml >spec-info.xml
+
+spec.fo: spec-pr.xml MyStyle-spec-fo.xsl MyStyle-fo.xsl MyStyle.xsl \
+ MyTitleStyle.xsl
+ /bin/rm -rf spec.fo spec-pr.fo
+ xmlto -x MyStyle-spec-fo.xsl fo spec-pr.xml
+ /bin/mv -f spec-pr.fo spec.fo
+
+###
+### PS/PDF generation using fop
+###
+
+# Do not use pdf2ps from the PDF version; better PS is generated directly.
+
+fop-spec.ps: spec.fo
+ FOP_OPTS=-Xmx512m fop spec.fo -ps spec-tmp.ps
+ mv spec-tmp.ps spec.ps
+
+# Do not use ps2pdf from the PS version; better PDF is generated directly. It
+# contains cross links etc. We post-process it to add page label information
+# so that the page identifiers shown by acroread are the correct page numbers.
+
+fop-spec.pdf: spec.fo PageLabelPDF
+ FOP_OPTS=-Xmx512m fop spec.fo -pdf spec-tmp.pdf
+ ./PageLabelPDF 12 <spec-tmp.pdf >spec.pdf