annotate DOCS/xml/configure @ 31777:12ef042165eb

Simplify adding --catalogs option to xsltproc/xmllint command line.
author diego
date Wed, 28 Jul 2010 09:47:41 +0000
parents ba2ae47a445f
children ef8632ee675b
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
rev   line source
10309
3c0e1b182fbc XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff changeset
1 #!/bin/sh
3c0e1b182fbc XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff changeset
2
3c0e1b182fbc XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff changeset
3 # Script to check for catalogs, stylesheets, XSL processors and all
3c0e1b182fbc XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff changeset
4 # the other stuff necessary to convert the XML documentation.
3c0e1b182fbc XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff changeset
5
11817
19919e913e3d Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents: 11468
diff changeset
6 echo "Searching for XML catalogs..."
31771
75398f13e9f6 cosmetics: Drop leading underscores from variable names.
diego
parents: 31770
diff changeset
7 for try_catalog in \
15132
f3617970ae22 Break overly long lines into something more manageable.
diego
parents: 13838
diff changeset
8 /etc/sgml/catalog \
17239
b654001ae89a Add current Cygwin tool paths.
diego
parents: 15133
diff changeset
9 /usr/share/xml/docbook/*/catalog.xml \
21806
5aaf8dbd177e add autodetection support for docbook stuff installed in /opt, such as macports do for ex.
gpoirier
parents: 20761
diff changeset
10 /opt/local/share/xml/docbook-xml/*/catalog.xml \
26149
484bf3498911 Add some more paths to find tools on Slackware 12.
diego
parents: 26021
diff changeset
11 /usr/share/sgml/docbook/*/*catalog \
15132
f3617970ae22 Break overly long lines into something more manageable.
diego
parents: 13838
diff changeset
12 /usr/share/apps/ksgmltools2/customization/en/catalog \
f3617970ae22 Break overly long lines into something more manageable.
diego
parents: 13838
diff changeset
13 /usr/share/sgml/catalog \
f3617970ae22 Break overly long lines into something more manageable.
diego
parents: 13838
diff changeset
14 /usr/local/share/sgml/catalog \
f3617970ae22 Break overly long lines into something more manageable.
diego
parents: 13838
diff changeset
15 /usr/lib/sgml/catalog \
f3617970ae22 Break overly long lines into something more manageable.
diego
parents: 13838
diff changeset
16 /usr/local/lib/sgml/catalog \
f3617970ae22 Break overly long lines into something more manageable.
diego
parents: 13838
diff changeset
17 /usr/share/docbook-xml42/catalog.xml \
f3617970ae22 Break overly long lines into something more manageable.
diego
parents: 13838
diff changeset
18 /usr/share/sgml/docbook/xmlcatalog
10309
3c0e1b182fbc XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff changeset
19 do
31774
ba2ae47a445f cosmetics: Use more compact "if .. then" shell syntax.
diego
parents: 31773
diff changeset
20 if test -f "$try_catalog"; then
31771
75398f13e9f6 cosmetics: Drop leading underscores from variable names.
diego
parents: 31770
diff changeset
21 catalog=$try_catalog
10309
3c0e1b182fbc XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff changeset
22 break
3c0e1b182fbc XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff changeset
23 fi
3c0e1b182fbc XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff changeset
24 done
3c0e1b182fbc XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff changeset
25
31774
ba2ae47a445f cosmetics: Use more compact "if .. then" shell syntax.
diego
parents: 31773
diff changeset
26 if test -n "$catalog"; then
31771
75398f13e9f6 cosmetics: Drop leading underscores from variable names.
diego
parents: 31770
diff changeset
27 echo "Found SGML catalog at $catalog"
31777
12ef042165eb Simplify adding --catalogs option to xsltproc/xmllint command line.
diego
parents: 31774
diff changeset
28 catalog_opts=--catalogs
10309
3c0e1b182fbc XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff changeset
29 else
3c0e1b182fbc XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff changeset
30 echo "No SGML catalog found."
3c0e1b182fbc XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff changeset
31 fi
3c0e1b182fbc XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff changeset
32
3c0e1b182fbc XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff changeset
33
3c0e1b182fbc XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff changeset
34
11206
e7534574320c html.xsl ---> html-single.xsl + more consistency + small fixes
diego
parents: 11188
diff changeset
35 echo "Searching for stylesheets..."
e7534574320c html.xsl ---> html-single.xsl + more consistency + small fixes
diego
parents: 11188
diff changeset
36 echo "Searching for html/chunk.xsl..."
31771
75398f13e9f6 cosmetics: Drop leading underscores from variable names.
diego
parents: 31770
diff changeset
37 for try_chunk_xsl in \
26149
484bf3498911 Add some more paths to find tools on Slackware 12.
diego
parents: 26021
diff changeset
38 /usr/share/xml/docbook/*/html/chunk.xsl \
15132
f3617970ae22 Break overly long lines into something more manageable.
diego
parents: 13838
diff changeset
39 /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/html/chunk.xsl \
f3617970ae22 Break overly long lines into something more manageable.
diego
parents: 13838
diff changeset
40 /usr/share/sgml/docbook/yelp/docbook/html/chunk.xsl \
f3617970ae22 Break overly long lines into something more manageable.
diego
parents: 13838
diff changeset
41 /usr/local/share/sgml/docbook/stylesheet/xsl/nwalsh/html/chunk.xsl \
f3617970ae22 Break overly long lines into something more manageable.
diego
parents: 13838
diff changeset
42 /usr/local/share/sgml/docbook/yelp/docbook/html/chunk.xsl \
f3617970ae22 Break overly long lines into something more manageable.
diego
parents: 13838
diff changeset
43 /usr/share/docbook-xsl/html/chunk.xsl \
17676
b7f727c156fd Add XML tool paths for SUSE 10.0
diego
parents: 17458
diff changeset
44 /usr/share/sgml/docbook/xsl-stylesheets*/html/chunk.xsl \
b7f727c156fd Add XML tool paths for SUSE 10.0
diego
parents: 17458
diff changeset
45 /usr/share/xml/docbook/stylesheet/nwalsh/current/html/chunk.xsl \
21806
5aaf8dbd177e add autodetection support for docbook stuff installed in /opt, such as macports do for ex.
gpoirier
parents: 20761
diff changeset
46 /opt/local/share/xsl/docbook-xsl/html/chunk.xsl \
17676
b7f727c156fd Add XML tool paths for SUSE 10.0
diego
parents: 17458
diff changeset
47
10309
3c0e1b182fbc XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff changeset
48 do
31774
ba2ae47a445f cosmetics: Use more compact "if .. then" shell syntax.
diego
parents: 31773
diff changeset
49 if test -f "$try_chunk_xsl"; then
31771
75398f13e9f6 cosmetics: Drop leading underscores from variable names.
diego
parents: 31770
diff changeset
50 chunk_xsl=$try_chunk_xsl
10309
3c0e1b182fbc XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff changeset
51 break
3c0e1b182fbc XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff changeset
52 fi
3c0e1b182fbc XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff changeset
53 done
3c0e1b182fbc XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff changeset
54
31774
ba2ae47a445f cosmetics: Use more compact "if .. then" shell syntax.
diego
parents: 31773
diff changeset
55 if test -z "$chunk_xsl"; then
31771
75398f13e9f6 cosmetics: Drop leading underscores from variable names.
diego
parents: 31770
diff changeset
56 chunk_xsl=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/html/chunk.xsl
75398f13e9f6 cosmetics: Drop leading underscores from variable names.
diego
parents: 31770
diff changeset
57 echo "Not found. Using default ($chunk_xsl)"
75398f13e9f6 cosmetics: Drop leading underscores from variable names.
diego
parents: 31770
diff changeset
58 fake_chunk_xsl=yes
10309
3c0e1b182fbc XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff changeset
59 else
31771
75398f13e9f6 cosmetics: Drop leading underscores from variable names.
diego
parents: 31770
diff changeset
60 echo "Found chunk.xsl at $chunk_xsl"
10309
3c0e1b182fbc XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff changeset
61 fi
3c0e1b182fbc XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff changeset
62
11188
6dfed0b2a300 Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents: 11012
diff changeset
63 echo "Searching for html/docbook.xsl..."
31771
75398f13e9f6 cosmetics: Drop leading underscores from variable names.
diego
parents: 31770
diff changeset
64 for try_docbook_xsl in \
26149
484bf3498911 Add some more paths to find tools on Slackware 12.
diego
parents: 26021
diff changeset
65 /usr/share/xml/docbook/*/html/docbook.xsl \
15132
f3617970ae22 Break overly long lines into something more manageable.
diego
parents: 13838
diff changeset
66 /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/html/docbook.xsl \
f3617970ae22 Break overly long lines into something more manageable.
diego
parents: 13838
diff changeset
67 /usr/share/sgml/docbook/yelp/docbook/html/docbook.xsl \
f3617970ae22 Break overly long lines into something more manageable.
diego
parents: 13838
diff changeset
68 /usr/local/share/sgml/docbook/stylesheet/xsl/nwalsh/html/docbook.xsl \
f3617970ae22 Break overly long lines into something more manageable.
diego
parents: 13838
diff changeset
69 /usr/local/share/sgml/docbook/yelp/docbook/html/docbook.xsl \
f3617970ae22 Break overly long lines into something more manageable.
diego
parents: 13838
diff changeset
70 /usr/share/docbook-xsl/html/docbook.xsl \
17676
b7f727c156fd Add XML tool paths for SUSE 10.0
diego
parents: 17458
diff changeset
71 /usr/share/sgml/docbook/xsl-stylesheets*/html/docbook.xsl \
b7f727c156fd Add XML tool paths for SUSE 10.0
diego
parents: 17458
diff changeset
72 /usr/share/xml/docbook/stylesheet/nwalsh/current/html/docbook.xsl \
21806
5aaf8dbd177e add autodetection support for docbook stuff installed in /opt, such as macports do for ex.
gpoirier
parents: 20761
diff changeset
73 /opt/local/share/xsl/docbook-xsl/html/docbook.xsl \
17676
b7f727c156fd Add XML tool paths for SUSE 10.0
diego
parents: 17458
diff changeset
74
11188
6dfed0b2a300 Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents: 11012
diff changeset
75 do
31774
ba2ae47a445f cosmetics: Use more compact "if .. then" shell syntax.
diego
parents: 31773
diff changeset
76 if test -f "$try_docbook_xsl"; then
31771
75398f13e9f6 cosmetics: Drop leading underscores from variable names.
diego
parents: 31770
diff changeset
77 docbook_xsl=$try_docbook_xsl
11188
6dfed0b2a300 Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents: 11012
diff changeset
78 break
6dfed0b2a300 Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents: 11012
diff changeset
79 fi
6dfed0b2a300 Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents: 11012
diff changeset
80 done
6dfed0b2a300 Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents: 11012
diff changeset
81
31774
ba2ae47a445f cosmetics: Use more compact "if .. then" shell syntax.
diego
parents: 31773
diff changeset
82 if test -z "$docbook_xsl"; then
31771
75398f13e9f6 cosmetics: Drop leading underscores from variable names.
diego
parents: 31770
diff changeset
83 docbook_xsl=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/html/docbook.xsl
75398f13e9f6 cosmetics: Drop leading underscores from variable names.
diego
parents: 31770
diff changeset
84 echo "Not found. Using default ($docbook_xsl)"
11188
6dfed0b2a300 Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents: 11012
diff changeset
85 else
31771
75398f13e9f6 cosmetics: Drop leading underscores from variable names.
diego
parents: 31770
diff changeset
86 echo "Found docbook.xsl at $docbook_xsl"
11188
6dfed0b2a300 Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents: 11012
diff changeset
87 fi
6dfed0b2a300 Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents: 11012
diff changeset
88
6dfed0b2a300 Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents: 11012
diff changeset
89 cat > html-chunk.xsl << EOF
20761
3ea816dc678e Generated XSL files should be in UTF-8.
diego
parents: 20440
diff changeset
90 <?xml version="1.0" encoding="utf-8"?>
11188
6dfed0b2a300 Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents: 11012
diff changeset
91 <!-- **************************************************
6dfed0b2a300 Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents: 11012
diff changeset
92 This file is generated automatically. DO NOT EDIT.
6dfed0b2a300 Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents: 11012
diff changeset
93 ************************************************** -->
6dfed0b2a300 Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents: 11012
diff changeset
94 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
6dfed0b2a300 Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents: 11012
diff changeset
95 version="1.0">
6dfed0b2a300 Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents: 11012
diff changeset
96
31771
75398f13e9f6 cosmetics: Drop leading underscores from variable names.
diego
parents: 31770
diff changeset
97 <xsl:import href="$chunk_xsl"/>
11188
6dfed0b2a300 Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents: 11012
diff changeset
98 <xsl:include href="html-common.xsl"/>
6dfed0b2a300 Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents: 11012
diff changeset
99
6dfed0b2a300 Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents: 11012
diff changeset
100 </xsl:stylesheet>
6dfed0b2a300 Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents: 11012
diff changeset
101 EOF
6dfed0b2a300 Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents: 11012
diff changeset
102
6dfed0b2a300 Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents: 11012
diff changeset
103
11206
e7534574320c html.xsl ---> html-single.xsl + more consistency + small fixes
diego
parents: 11188
diff changeset
104 cat > html-single.xsl << EOF
20761
3ea816dc678e Generated XSL files should be in UTF-8.
diego
parents: 20440
diff changeset
105 <?xml version="1.0" encoding="utf-8"?>
10309
3c0e1b182fbc XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff changeset
106 <!-- **************************************************
3c0e1b182fbc XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff changeset
107 This file is generated automatically. DO NOT EDIT.
3c0e1b182fbc XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff changeset
108 ************************************************** -->
3c0e1b182fbc XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff changeset
109 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
3c0e1b182fbc XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff changeset
110 version="1.0">
3c0e1b182fbc XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff changeset
111
31771
75398f13e9f6 cosmetics: Drop leading underscores from variable names.
diego
parents: 31770
diff changeset
112 <xsl:import href="$docbook_xsl"/>
10309
3c0e1b182fbc XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff changeset
113 <xsl:include href="html-common.xsl"/>
3c0e1b182fbc XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff changeset
114
3c0e1b182fbc XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff changeset
115 </xsl:stylesheet>
3c0e1b182fbc XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff changeset
116 EOF
3c0e1b182fbc XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff changeset
117
11817
19919e913e3d Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents: 11468
diff changeset
118 echo "Searching for DTD..."
22496
e204544de710 Make sure docbook 4.x gets preferred over 3.x.
diego
parents: 22126
diff changeset
119 #FIXME: This should prefer higher version numbers, not the other way around ..
31771
75398f13e9f6 cosmetics: Drop leading underscores from variable names.
diego
parents: 31770
diff changeset
120 for try_dtd in \
22496
e204544de710 Make sure docbook 4.x gets preferred over 3.x.
diego
parents: 22126
diff changeset
121 /usr/share/xml/docbook/*/dtd/4*/docbookx.dtd \
17239
b654001ae89a Add current Cygwin tool paths.
diego
parents: 15133
diff changeset
122 /usr/share/xml/docbook/*/docbookx.dtd \
22126
b49bc3a14c3c some more docbook paths, patch by Torinthiel
diego
parents: 21806
diff changeset
123 /usr/share/sgml/docbook/*/docbookx.dtd \
b49bc3a14c3c some more docbook paths, patch by Torinthiel
diego
parents: 21806
diff changeset
124 /usr/share/sgml/docbook/dtd/*/docbookx.dtd \
b49bc3a14c3c some more docbook paths, patch by Torinthiel
diego
parents: 21806
diff changeset
125 /usr/share/sgml/docbook/dtd/xml/*/docbookx.dtd \
b49bc3a14c3c some more docbook paths, patch by Torinthiel
diego
parents: 21806
diff changeset
126 /usr/share/docbook-xml*/docbookx.dtd \
26021
69e007ee01d6 improve DTD dection of MacPort-install docbook package
gpoirier
parents: 22496
diff changeset
127 /opt/local/share/xml/docbook*/*/docbookx.dtd \
22126
b49bc3a14c3c some more docbook paths, patch by Torinthiel
diego
parents: 21806
diff changeset
128 /usr/share/apps/ksgmltools2/docbook/*/docbookx.dtd
11817
19919e913e3d Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents: 11468
diff changeset
129 do
31774
ba2ae47a445f cosmetics: Use more compact "if .. then" shell syntax.
diego
parents: 31773
diff changeset
130 if test -f "$try_dtd"; then
31771
75398f13e9f6 cosmetics: Drop leading underscores from variable names.
diego
parents: 31770
diff changeset
131 dtd=$try_dtd
11817
19919e913e3d Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents: 11468
diff changeset
132 break
19919e913e3d Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents: 11468
diff changeset
133 fi
19919e913e3d Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents: 11468
diff changeset
134 done
10309
3c0e1b182fbc XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff changeset
135
31774
ba2ae47a445f cosmetics: Use more compact "if .. then" shell syntax.
diego
parents: 31773
diff changeset
136 if test -z "$dtd"; then
31771
75398f13e9f6 cosmetics: Drop leading underscores from variable names.
diego
parents: 31770
diff changeset
137 dtd=/usr/share/sgml/docbook/dtd/xml/4.1.2/docbookx.dtd
75398f13e9f6 cosmetics: Drop leading underscores from variable names.
diego
parents: 31770
diff changeset
138 echo "Not found. Using default ($dtd)."
11817
19919e913e3d Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents: 11468
diff changeset
139 else
31771
75398f13e9f6 cosmetics: Drop leading underscores from variable names.
diego
parents: 31770
diff changeset
140 echo "Found docbookx.dtd at $dtd"
11817
19919e913e3d Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents: 11468
diff changeset
141 fi
19919e913e3d Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents: 11468
diff changeset
142
27297
d41a06f831ee docs build fix
henry
parents: 26149
diff changeset
143 for lang in `grep 'DOC_LANGS =' ../../config.mak|cut -d= -f2`; do
11817
19919e913e3d Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents: 11468
diff changeset
144 cat > $lang/main.xml << EOF
20761
3ea816dc678e Generated XSL files should be in UTF-8.
diego
parents: 20440
diff changeset
145 <?xml version="1.0" encoding="utf-8" standalone="no"?>
20440
ef1252f1ac2d Clearly state that main.xml is generated
torinthiel
parents: 17676
diff changeset
146 <!-- **************************************************
ef1252f1ac2d Clearly state that main.xml is generated
torinthiel
parents: 17676
diff changeset
147 This file is generated automatically. DO NOT EDIT.
ef1252f1ac2d Clearly state that main.xml is generated
torinthiel
parents: 17676
diff changeset
148 ************************************************** -->
11817
19919e913e3d Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents: 11468
diff changeset
149 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN"
31771
75398f13e9f6 cosmetics: Drop leading underscores from variable names.
diego
parents: 31770
diff changeset
150 "$dtd"
29263
0f1b5b68af32 whitespace cosmetics: Remove all trailing whitespace.
diego
parents: 28969
diff changeset
151 [
11817
19919e913e3d Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents: 11468
diff changeset
152 EOF
19919e913e3d Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents: 11468
diff changeset
153
31773
69eadc0c5372 Adding XML entities for the English XML files to main.xml is enough.
diego
parents: 31772
diff changeset
154 for file in $(find en -name \*.xml -exec basename \{\} \;); do
30990
0ad2da052b2e the great MPlayer tab removal: part I
diego
parents: 29968
diff changeset
155 echo '<!ENTITY '$file' SYSTEM "'$file'">' >> $lang/main.xml
11817
19919e913e3d Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents: 11468
diff changeset
156 done
19919e913e3d Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents: 11468
diff changeset
157
19919e913e3d Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents: 11468
diff changeset
158 cat >> $lang/main.xml << EOF
19919e913e3d Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents: 11468
diff changeset
159 ]>
19919e913e3d Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents: 11468
diff changeset
160 <book id="index" lang="$lang">
19919e913e3d Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents: 11468
diff changeset
161 &documentation.xml;
19919e913e3d Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents: 11468
diff changeset
162 </book>
19919e913e3d Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents: 11468
diff changeset
163 EOF
19919e913e3d Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents: 11468
diff changeset
164
19919e913e3d Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents: 11468
diff changeset
165 done
10309
3c0e1b182fbc XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff changeset
166
3c0e1b182fbc XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff changeset
167 echo "Looking for a valid XSLT processor..."
31774
ba2ae47a445f cosmetics: Use more compact "if .. then" shell syntax.
diego
parents: 31773
diff changeset
168 if xsltproc --version > /dev/null 2>&1; then
ba2ae47a445f cosmetics: Use more compact "if .. then" shell syntax.
diego
parents: 31773
diff changeset
169 if test -z "$fake_chunk_xsl"; then
10309
3c0e1b182fbc XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff changeset
170 echo "Found xsltproc. If it works, it's probably the best choice."
31777
12ef042165eb Simplify adding --catalogs option to xsltproc/xmllint command line.
diego
parents: 31774
diff changeset
171 xsltcommand="xsltproc $catalog_opts -o \$\$1 \$\$2 \$\$3"
10309
3c0e1b182fbc XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff changeset
172 else
3c0e1b182fbc XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff changeset
173 echo "Found xsltproc but no stylesheets on your system."
3c0e1b182fbc XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff changeset
174 echo "xsltproc is unusable without stylesheets."
3c0e1b182fbc XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff changeset
175 fi
3c0e1b182fbc XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff changeset
176 fi
3c0e1b182fbc XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff changeset
177
3c0e1b182fbc XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff changeset
178
11206
e7534574320c html.xsl ---> html-single.xsl + more consistency + small fixes
diego
parents: 11188
diff changeset
179 echo "Searching for XML checker..."
31770
abfc5eb7af04 Simplify xmllint test.
diego
parents: 31472
diff changeset
180 if command -v xmllint > /dev/null 2>&1; then
abfc5eb7af04 Simplify xmllint test.
diego
parents: 31472
diff changeset
181 echo "Found xmllint"
31777
12ef042165eb Simplify adding --catalogs option to xsltproc/xmllint command line.
diego
parents: 31774
diff changeset
182 xmllint_command="xmllint --noout --noent --postvalid $catalog_opts \$*"
31770
abfc5eb7af04 Simplify xmllint test.
diego
parents: 31472
diff changeset
183 else
11188
6dfed0b2a300 Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents: 11012
diff changeset
184 echo "Not found"
31771
75398f13e9f6 cosmetics: Drop leading underscores from variable names.
diego
parents: 31770
diff changeset
185 xmllint_command=true
10309
3c0e1b182fbc XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff changeset
186 fi
3c0e1b182fbc XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff changeset
187
31468
dbab16182ba2 Get rid of xmllint wrapper redirection; run commands directly from make.
diego
parents: 30990
diff changeset
188 cat > xml.mak << EOF
31771
75398f13e9f6 cosmetics: Drop leading underscores from variable names.
diego
parents: 31770
diff changeset
189 CATALOG = $catalog
75398f13e9f6 cosmetics: Drop leading underscores from variable names.
diego
parents: 31770
diff changeset
190 XMLLINT_COMMAND = $xmllint_command
75398f13e9f6 cosmetics: Drop leading underscores from variable names.
diego
parents: 31770
diff changeset
191 XSLT_COMMAND = $xsltcommand
10309
3c0e1b182fbc XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff changeset
192 EOF