[49344] branches/new-help-system/base/doc/Makefile

raimue at macports.org raimue at macports.org
Tue Apr 7 20:55:52 PDT 2009


Revision: 49344
          http://trac.macports.org/changeset/49344
Author:   raimue at macports.org
Date:     2009-04-07 20:55:51 -0700 (Tue, 07 Apr 2009)
Log Message:
-----------
doc/Makefile:
Add support for a2x, add new XML and HTML targets

Modified Paths:
--------------
    branches/new-help-system/base/doc/Makefile

Modified: branches/new-help-system/base/doc/Makefile
===================================================================
--- branches/new-help-system/base/doc/Makefile	2009-04-08 03:52:46 UTC (rev 49343)
+++ branches/new-help-system/base/doc/Makefile	2009-04-08 03:55:51 UTC (rev 49344)
@@ -1,3 +1,4 @@
+A2X=		a2x
 MAN1=		port.1
 MAN5=		macports.conf.5
 MAN7=		portfile.7 portstyle.7 porthier.7 portgroup.7
@@ -8,9 +9,18 @@
 include ../Mk/macports.autoconf.mk
 endif
 
-all: ${MAN1:.1=.1.gz} ${MAN5:.5=.5.gz} ${MAN7:.7=.7.gz}
+all: man
 
+man: ${MAN1} ${MAN5} ${MAN7} ${MAN1:.1=.1.gz} ${MAN5:.5=.5.gz} ${MAN7:.7=.7.gz}
+
+xml: ${MAN1:.1=.1.xml} ${MAN5:.5=.5.xml} ${MAN7:.7=.7.xml}
+
+html: ${MAN1:.1=.1.html} ${MAN5:.5=.5.html} ${MAN7:.7=.7.html}
+
 clean:
+	rm -f *.{1,5,7}
+	rm -f *.{1,5,7}.html
+	rm -f *.{1,5,7}.xml
 	rm -f *.{1,5,7}.gz
 
 test:
@@ -27,6 +37,22 @@
 %.7.gz: %.7
 	gzip -c $^ > $@
 
+%.1 %.1.xml: %.1.txt
+	$(A2X) --asciidoc-opts='-f asciidoc.conf' -f manpage $<
+
+%.5 %.5.xml: %.5.txt
+	$(A2X) --asciidoc-opts='-f asciidoc.conf' -f manpage $<
+
+%.7 %.7.xml: %.7.txt
+	$(A2X) --asciidoc-opts='-f asciidoc.conf' -f manpage $<
+
+%.1.html: %.1.txt
+%.5.html: %.5.txt
+%.5.html: %.5.txt
+
+%.html: %.txt
+	$(A2X) --asciidoc-opts='-f asciidoc.conf' -f xhtml $<
+
 install: all
 	$(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} ${INSTALLDIR}
 	$(INSTALL) -d -o ${DSTUSR} -g ${DSTGRP} -m ${DSTMODE} ${DESTDIR}${mpconfigdir}
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.macosforge.org/pipermail/macports-changes/attachments/20090407/c06fe56f/attachment.html>


More information about the macports-changes mailing list