Merging upstream version 0.2.1.
[debian/lxappearance.git] / man / Makefile.am
index af887a3..0d3d85c 100644 (file)
@@ -1,9 +1,28 @@
+man_MANS = \
+       lxappearance.1
 
-dist_man_MANS = lxappearance.1
+man_XMANS = \
+       lxappearance.xml
 
-EXTRA_DIST = lxappearance.sgml
+EXTRA_DIST = \
+       $(man_MANS) \
+       $(man_XMANS)
+
+
+if ENABLE_REGENERATE_MAN
+
+lxappearance.1: lxappearance.xml
+       $(XSLTPROC) -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<        
+
+CLEANFILES = $(man_MANS) 
+else
+
+$(man_MANS):
+       @echo ""
+       @echo "Error: you need to run configure with '--enable-man'"
+       @echo "       in order to regenerate man pages."
+       @echo ""
+       @false
+endif
 
-dist-hook: lxappearance.1
 
-lxappearance.1: lxappearance.sgml
-       docbook-to-man $< > $@