annotate DOCS/xml/Makefile @ 9759:56be5a7b02a2

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