+EXTRA_XML = xslt/expand-sambadoc.xsl \
+ xslt/man.xsl \
+ xslt/settings.xsl \
+ entities/global.entities \
+ entities/xinclude.dtd
+
+
+EXTRA_DIST = $(ALL_MAN_PAGES) $(MAN_XML) $(EXTRA_XML)
+
+if HAVE_XSLTPROC
+
+GEN_XML = $(ALL_MAN_PAGES:%=xml-source/%.proc.xml)
+
+MOSTLYCLEANFILES = $(GEN_XML)
+MAINTAINERCLEANFILES = $(ALL_MAN_PAGES)
+
+xml-source/%.proc.xml: $(SRCMANPAGEDIR)/%.xml $(srcdir)/xslt/expand-sambadoc.xsl
+ $(XSLTPROC) --path $(srcdir)/xslt/ --xinclude --stringparam latex.imagebasedir "$*/" --stringparam noreference 1 --output $@ $(srcdir)/xslt/expand-sambadoc.xsl $<
+
+%: xml-source/%.proc.xml $(srcdir)/xslt/man.xsl
+ $(XSLTPROC) --path $(srcdir)/xslt/ --output $@ man.xsl $<
+
+endif
+# ^- HAVE_XSLTPROC