9674
|
1 # Makefile for generating the HTML documentation
|
|
2
|
|
3 #####[ Configuration ]##################################################
|
|
4
|
|
5 # The xsltproc program.
|
|
6 XSLTPROC = xsltproc
|
|
7
|
10025
|
8 # Another xslt converter.
|
|
9 # If you want to use it, change also USE_SAXON to 1 (below)
|
|
10 # Probably you must also change the path to saxon.jar.
|
|
11 USE_SAXON = 0
|
|
12 SAXON_COMMAND = java -cp /usr/share/java/saxon.jar com.icl.saxon.StyleSheet
|
|
13
|
9674
|
14 # The xmllint program.
|
|
15 XMLLINT = xmllint
|
|
16
|
|
17 # A colon separated list of catalog entry files.
|
|
18 # Without this properly set up, xmllint and xsltproc might be unable
|
|
19 # to find the DTDs for the system identifiers specified in the XML files.
|
|
20 # If the SGML_CATALOG_FILES environment variable is not set, list one
|
|
21 # or more catalogs here.
|
|
22 #
|
|
23 # on debian (potato?) systems, maybe others
|
|
24 #SGML_CATALOG_FILES ?= /etc/sgml/catalog
|
|
25 #
|
|
26 # on Mandrake (9.0?) systems, maybe others
|
|
27 SGML_CATALOG_FILES ?= /usr/share/sgml/docbook/xml-dtd-4.1.2/xmlcatalog
|
|
28 #SGML_CATALOG_FILES ?= /usr/share/apps/ksgmltools2/customization/en/catalog
|
|
29
|
|
30 # Full path of the "chunker" DocBook XSL stylesheet used to generate
|
|
31 # the HTML files.
|
|
32 #
|
|
33 # on debian (potato?)
|
|
34 #CHUNK_XSL = /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/html/chunk.xsl
|
|
35 #
|
|
36 # on Mandrake (9.0?) systems, maybe others
|
|
37 CHUNK_XSL = /usr/share/sgml/docbook/yelp/docbook/html/chunk.xsl
|
|
38
|
|
39 # List of subdirectories to be processed.
|
10110
|
40 SUBDIRS = en fr
|
9674
|
41
|
9759
|
42 # Here all generated html's go
|
|
43 HTML_TOP = ../HTML
|
|
44
|
9674
|
45 #####[ End of configuration ]###########################################
|
|
46
|
10025
|
47 export CHUNK_XSL SGML_CATALOG_FILES XMLLINT XSLTPROC SAXON_COMMAND USE_SAXON
|
9674
|
48
|
|
49 .PHONY: no-target
|
|
50 no-target:
|
|
51 @echo "What to make?"
|
|
52 @echo
|
|
53 @echo "Targets"
|
|
54 @echo "*******"
|
|
55 @echo "all : Build everything (same as build-html for now)."
|
|
56 @echo "build-html: Build HTML documentation."
|
|
57 @echo "clean-html: Purge the 'HTML' directory."
|
|
58 @echo "distclean : Remove ALL generated files."
|
|
59
|
|
60 .PHONY: all
|
|
61 all: build-html
|
|
62
|
|
63 .PHONY: build-html
|
|
64 build-html:
|
9759
|
65 test -d $(HTML_TOP) || mkdir $(HTML_TOP)
|
9674
|
66 for d in $(SUBDIRS); do\
|
|
67 test -f $$d/Makefile &&\
|
9759
|
68 (test -d $(HTML_TOP)/$$d || mkdir $(HTML_TOP)/$$d) &&\
|
|
69 if $(MAKE) HTMLDIR=../$(HTML_TOP)/$$d -C $$d; then :; else exit 1; fi;\
|
9674
|
70 done
|
|
71
|
|
72 .PHONY: test
|
|
73 test:
|
|
74 @if command -v $(XSLTPROC) >/dev/null; then :; else exit 1; fi
|
|
75 @if command -v $(XMLLINT) >/dev/null; then :; else exit 1; fi
|
|
76 @test -f $(CHUNK_XSL) || (echo "file not found: $(CHUNK_XSL)"; exit 1)
|
|
77 @echo "All tests passed."
|
|
78
|
|
79 .PHONY: clean-html
|
|
80 clean-html:
|
9759
|
81 -rm -rf $(HTML_TOP)
|
9674
|
82
|
|
83 .PHONY: distclean
|
|
84 distclean: clean-html
|
|
85 -rm -f html.xsl
|