-%: xml-source/%.proc.xml $(srcdir)/xslt/man.xsl
- $(XSLTPROC) $(XSLTPROC_FLAGS) --path $(srcdir)/xslt/ --output $@ http://docbook.sourceforge.net/release/xsl/$(XSLREL)/manpages/docbook.xsl $<
+# phase two generates a manpage from the resulting "expanded" docbook XML
+%: xml-source/%.proc.xml $(srcdir)/xslt/man.xsl entities/global.entities
+ $(XSLTPROC) $(XSLTPROC_FLAGS) --path $(srcdir)/xslt/ --output $@ xslt/man.xsl $<
+
+%.html: xml-source/%.proc.xml $(srcdir)/xslt/html.xsl entities/global.entities
+ $(XSLTPROC) $(XSLTPROC_FLAGS) --path $(srcdir)/xslt/ --output $@ xslt/html.xsl $<