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