source: trunk/doc-new/Makefile @ 30437

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

Copied the new guide from /trunk/doc to /trunk/doc-new.
Added new directory "man" which stores the new docbook xml man files.
Added new Makefile which generates the guide and the man files.

  • Property svn:keywords set to Id
File size: 1.5 KB
Line 
1# $Id: Makefile 29265 2007-09-19 20:21:29Z 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)/portfile.7 \
49            $(MAN-XSL) $(MAN)/xml/portfile.7.xml
50
51clean:
52        rm -rf $(GUIDE-RESULT)
53        rm -rf $(MAN-RESULT)
Note: See TracBrowser for help on using the repository browser.