[31436] branches/simon-doc-test/doc-new/Makefile

simon at macports.org simon at macports.org
Fri Nov 23 13:44:30 PST 2007


Revision: 31436
          http://trac.macosforge.org/projects/macports/changeset/31436
Author:   simon at macports.org
Date:     2007-11-23 13:44:28 -0800 (Fri, 23 Nov 2007)

Log Message:
-----------
doc-new-test: Updated Makefile to use some more variables to reduce duplication.

Modified Paths:
--------------
    branches/simon-doc-test/doc-new/Makefile

Modified: branches/simon-doc-test/doc-new/Makefile
===================================================================
--- branches/simon-doc-test/doc-new/Makefile	2007-11-23 20:42:38 UTC (rev 31435)
+++ branches/simon-doc-test/doc-new/Makefile	2007-11-23 21:44:28 UTC (rev 31436)
@@ -3,7 +3,7 @@
 # The ports 'docbook-xsl' and 'docbook-xml' have to be installed.
 
 # If your macports isn't installed in /opt/local you have to change PREFIX
-# here and update resources/macports.xsl to use your port installation!
+# here and update man/resources/macports.xsl to use your port installation!
 
 
 # prefix of the macports installation:
@@ -12,9 +12,14 @@
 # data directories:
 GUIDE ?= guide
 MAN   ?= man
+# source directories:
+GUIDE-SRC ?= $(GUIDE)/xml
+MAN-SRC   ?= $(MAN)/xml
 # result directories:
 GUIDE-RESULT ?= $(GUIDE)/html
 MAN-RESULT   ?= $(MAN)/man/
+# man temporary directory:
+MAN-TMP ?= $(MAN)/tmp
 
 # path to the docbook xsl files:
 DOCBOOK   ?= $(PREFIX)/share/xsl/docbook-xsl
@@ -41,19 +46,19 @@
 	cp $(GUIDE)/resources/$(STYLESHEET) $(GUIDE-RESULT)/$(STYLESHEET)
 	cp $(GUIDE)/resources/images/* $(GUIDE-RESULT)/
 	xsltproc --xinclude $(STRINGPARAMS) --output $(GUIDE-RESULT)/guide.html \
-	    $(GUIDE-XSL) $(GUIDE)/xml/guide.xml
+	    $(GUIDE-XSL) $(GUIDE-SRC)/guide.xml
 
 man:
 	mkdir -p $(MAN-RESULT)
-	mkdir -p $(MAN)/tmp
-	cp $(GUIDE)/xml/portfile-*.xml $(MAN)/tmp/
-	sed -i "" 's|<section>|<refsection\>|g' $(MAN)/tmp/*
-	sed -i "" 's|</section>|</refsection>|g' $(MAN)/tmp/*
+	mkdir -p $(MAN-TMP)
+	cp $(GUIDE-SRC)/portfile-*.xml $(MAN-TMP)
+	sed -i "" 's|<section>|<refsection\>|g' $(MAN-TMP)/*
+	sed -i "" 's|</section>|</refsection>|g' $(MAN-TMP)/*
 	xsltproc --xinclude --output $(MAN-RESULT) $(MAN-XSL) \
-	    $(MAN)/xml/portfile.7.xml \
-	    $(MAN)/xml/portgroup.7.xml \
-	    $(MAN)/xml/porthier.7.xml
-	rm -r $(MAN)/tmp
+	    $(MAN-SRC)/portfile.7.xml \
+	    $(MAN-SRC)/portgroup.7.xml \
+	    $(MAN-SRC)/porthier.7.xml
+	rm -r $(MAN-TMP)
 
 clean:
 	rm -rf $(GUIDE-RESULT)

-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.macosforge.org/pipermail/macports-changes/attachments/20071123/0f79f536/attachment.html


More information about the macports-changes mailing list