source: trunk/doc-new/Makefile @ 30828

Last change on this file since 30828 was 30694, checked in by simon@…, 12 years ago

doc-new: All portfile man pages are now generated automatically.

  • Property svn:keywords set to Id
File size: 1.7 KB
Line 
1# $Id: Makefile 30694 2007-11-04 18:06:16Z simon@macports.org $
2# Makefile to generate the macports html guide and the man pages.
3# The ports 'docbook-xsl' and 'docbook-xml' have to be installed.
4
5# If your macports isn't installed in /opt/local you have to change PREFIX
6# here and update resources/macports.xsl to use your port installation!
7
8
9# prefix of the macports installation:
10PREFIX ?= /opt/local
11
12# data directories:
13GUIDE ?= guide
14MAN   ?= man
15# result directories:
16GUIDE-RESULT ?= $(GUIDE)/html
17MAN-RESULT   ?= $(MAN)/man/
18
19# path to the docbook xsl files:
20DOCBOOK   ?= $(PREFIX)/share/xsl/docbook-xsl
21GUIDE-XSL ?= $(DOCBOOK)/xhtml/profile-docbook.xsl
22MAN-XSL   ?= $(MAN)/resources/macports.xsl
23
24# docbook html stylesheet for the guide:
25STYLESHEET ?= docbook.css
26# additional parameters for the guide:
27STRINGPARAMS ?= --stringparam html.stylesheet $(STYLESHEET) \
28                                                        --stringparam section.autolabel 1 \
29                                                          --stringparam toc.section.depth 1 \
30                                                          --stringparam generate.toc "book toc" \
31                                                          --stringparam section.label.includes.component.label 1 \
32                                                          --stringparam profile.condition "noman"
33
34
35.PHONY: all guide man clean
36
37all: guide man
38
39guide:
40        mkdir -p $(GUIDE-RESULT)
41        cp $(GUIDE)/resources/$(STYLESHEET) $(GUIDE-RESULT)/$(STYLESHEET)
42        cp $(GUIDE)/resources/images/* $(GUIDE-RESULT)/
43        xsltproc --xinclude $(STRINGPARAMS) --output $(GUIDE-RESULT)/guide.html \
44            $(GUIDE-XSL) $(GUIDE)/xml/guide.xml
45
46man:
47        mkdir -p $(MAN-RESULT)
48        xsltproc --output $(MAN-RESULT) $(MAN-XSL) \
49            $(MAN)/xml/portfile.7.xml \
50            $(MAN)/xml/portfile-global.7.xml \
51            $(MAN)/xml/portfile-phase.7.xml \
52            $(MAN)/xml/portfile-startupitem.7.xml \
53            $(MAN)/xml/portfile-tcl.7.xml
54
55clean:
56        rm -rf $(GUIDE-RESULT)
57        rm -rf $(MAN-RESULT)
Note: See TracBrowser for help on using the repository browser.