Mercurial > mplayer.hg
annotate DOCS/xml/configure @ 31770:abfc5eb7af04
Simplify xmllint test.
author | diego |
---|---|
date | Wed, 28 Jul 2010 05:35:15 +0000 |
parents | f5b66007c5e1 |
children | 75398f13e9f6 |
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..." |
15132
f3617970ae22
Break overly long lines into something more manageable.
diego
parents:
13838
diff
changeset
|
7 for _try_catalog in \ |
f3617970ae22
Break overly long lines into something more manageable.
diego
parents:
13838
diff
changeset
|
8 /etc/sgml/catalog \ |
17239 | 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 | 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 |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
20 if test -f "$_try_catalog" |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
21 then |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
22 _catalog=$_try_catalog |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
23 break |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
24 fi |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
25 done |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
26 |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
27 if test -n "$_catalog" |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
28 then |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
29 echo "Found SGML catalog at $_catalog" |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
30 else |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
31 echo "No SGML catalog found." |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
32 fi |
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 |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
35 |
11206
e7534574320c
html.xsl ---> html-single.xsl + more consistency + small fixes
diego
parents:
11188
diff
changeset
|
36 echo "Searching for stylesheets..." |
e7534574320c
html.xsl ---> html-single.xsl + more consistency + small fixes
diego
parents:
11188
diff
changeset
|
37 echo "Searching for html/chunk.xsl..." |
15132
f3617970ae22
Break overly long lines into something more manageable.
diego
parents:
13838
diff
changeset
|
38 for _try_chunk_xsl in \ |
26149 | 39 /usr/share/xml/docbook/*/html/chunk.xsl \ |
15132
f3617970ae22
Break overly long lines into something more manageable.
diego
parents:
13838
diff
changeset
|
40 /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/html/chunk.xsl \ |
f3617970ae22
Break overly long lines into something more manageable.
diego
parents:
13838
diff
changeset
|
41 /usr/share/sgml/docbook/yelp/docbook/html/chunk.xsl \ |
f3617970ae22
Break overly long lines into something more manageable.
diego
parents:
13838
diff
changeset
|
42 /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
|
43 /usr/local/share/sgml/docbook/yelp/docbook/html/chunk.xsl \ |
f3617970ae22
Break overly long lines into something more manageable.
diego
parents:
13838
diff
changeset
|
44 /usr/share/docbook-xsl/html/chunk.xsl \ |
17676 | 45 /usr/share/sgml/docbook/xsl-stylesheets*/html/chunk.xsl \ |
46 /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
|
47 /opt/local/share/xsl/docbook-xsl/html/chunk.xsl \ |
17676 | 48 |
10309
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
49 do |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
50 if test -f "$_try_chunk_xsl" |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
51 then |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
52 _chunk_xsl=$_try_chunk_xsl |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
53 break |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
54 fi |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
55 done |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
56 |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
57 if test -z "$_chunk_xsl" |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
58 then |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
59 _chunk_xsl=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/html/chunk.xsl |
10912 | 60 echo "Not found. Using default ($_chunk_xsl)" |
61 _fake_chunk_xsl=yes | |
10309
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
62 else |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
63 echo "Found chunk.xsl at $_chunk_xsl" |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
64 fi |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
65 |
11188
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
66 echo "Searching for html/docbook.xsl..." |
15132
f3617970ae22
Break overly long lines into something more manageable.
diego
parents:
13838
diff
changeset
|
67 for _try_docbook_xsl in \ |
26149 | 68 /usr/share/xml/docbook/*/html/docbook.xsl \ |
15132
f3617970ae22
Break overly long lines into something more manageable.
diego
parents:
13838
diff
changeset
|
69 /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/html/docbook.xsl \ |
f3617970ae22
Break overly long lines into something more manageable.
diego
parents:
13838
diff
changeset
|
70 /usr/share/sgml/docbook/yelp/docbook/html/docbook.xsl \ |
f3617970ae22
Break overly long lines into something more manageable.
diego
parents:
13838
diff
changeset
|
71 /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
|
72 /usr/local/share/sgml/docbook/yelp/docbook/html/docbook.xsl \ |
f3617970ae22
Break overly long lines into something more manageable.
diego
parents:
13838
diff
changeset
|
73 /usr/share/docbook-xsl/html/docbook.xsl \ |
17676 | 74 /usr/share/sgml/docbook/xsl-stylesheets*/html/docbook.xsl \ |
75 /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
|
76 /opt/local/share/xsl/docbook-xsl/html/docbook.xsl \ |
17676 | 77 |
11188
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
78 do |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
79 if test -f "$_try_docbook_xsl" |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
80 then |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
81 _docbook_xsl=$_try_docbook_xsl |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
82 break |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
83 fi |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
84 done |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
85 |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
86 if test -z "$_docbook_xsl" |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
87 then |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
88 _docbook_xsl=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/html/docbook.xsl |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
89 echo "Not found. Using default ($_docbook_xsl)" |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
90 _fake_docbook_xsl=yes |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
91 else |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
92 echo "Found docbook.xsl at $_docbook_xsl" |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
93 fi |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
94 |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
95 cat > html-chunk.xsl << EOF |
20761 | 96 <?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
|
97 <!-- ************************************************** |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
98 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
|
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 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
|
101 version="1.0"> |
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 <xsl:import href="$_chunk_xsl"/> |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
104 <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
|
105 |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
106 </xsl:stylesheet> |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
107 EOF |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
108 |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
109 |
11206
e7534574320c
html.xsl ---> html-single.xsl + more consistency + small fixes
diego
parents:
11188
diff
changeset
|
110 cat > html-single.xsl << EOF |
20761 | 111 <?xml version="1.0" encoding="utf-8"?> |
10309
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
112 <!-- ************************************************** |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
113 This file is generated automatically. DO NOT EDIT. |
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 xmlns:xsl="http://www.w3.org/1999/XSL/Transform" |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
116 version="1.0"> |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
117 |
11188
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
118 <xsl:import href="$_docbook_xsl"/> |
10309
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
119 <xsl:include href="html-common.xsl"/> |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
120 |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
121 </xsl:stylesheet> |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
122 EOF |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
123 |
11817
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
124 echo "Searching for DTD..." |
22496 | 125 #FIXME: This should prefer higher version numbers, not the other way around .. |
15132
f3617970ae22
Break overly long lines into something more manageable.
diego
parents:
13838
diff
changeset
|
126 for _try_dtd in \ |
22496 | 127 /usr/share/xml/docbook/*/dtd/4*/docbookx.dtd \ |
17239 | 128 /usr/share/xml/docbook/*/docbookx.dtd \ |
22126 | 129 /usr/share/sgml/docbook/*/docbookx.dtd \ |
130 /usr/share/sgml/docbook/dtd/*/docbookx.dtd \ | |
131 /usr/share/sgml/docbook/dtd/xml/*/docbookx.dtd \ | |
132 /usr/share/docbook-xml*/docbookx.dtd \ | |
26021
69e007ee01d6
improve DTD dection of MacPort-install docbook package
gpoirier
parents:
22496
diff
changeset
|
133 /opt/local/share/xml/docbook*/*/docbookx.dtd \ |
22126 | 134 /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
|
135 do |
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
136 if test -f "$_try_dtd" |
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
137 then |
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
138 _dtd=$_try_dtd |
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
139 break |
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
140 fi |
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
141 done |
10309
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
142 |
11817
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
143 if test -z "$_dtd" |
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
144 then |
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
145 _dtd=/usr/share/sgml/docbook/dtd/xml/4.1.2/docbookx.dtd |
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
146 echo "Not found. Using default ($_dtd)." |
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
147 else |
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
148 echo "Found docbookx.dtd at $_dtd" |
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
149 fi |
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
150 |
27297 | 151 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
|
152 cat > $lang/main.xml << EOF |
20761 | 153 <?xml version="1.0" encoding="utf-8" standalone="no"?> |
20440 | 154 <!-- ************************************************** |
155 This file is generated automatically. DO NOT EDIT. | |
156 ************************************************** --> | |
11817
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
157 <!DOCTYPE book PUBLIC "-//OASIS//DTD DocBook XML V4.1.2//EN" |
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
158 "$_dtd" |
29263
0f1b5b68af32
whitespace cosmetics: Remove all trailing whitespace.
diego
parents:
28969
diff
changeset
|
159 [ |
11817
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
160 EOF |
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
161 |
11827
bedae65be7d1
sort -u is equivalent to sort | uniq, hint by Dominik.
diego
parents:
11826
diff
changeset
|
162 for file in `find $lang en -name \*.xml -exec basename \{\} \; | sort -u`; do |
30990 | 163 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
|
164 done |
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
165 |
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
166 cat >> $lang/main.xml << EOF |
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
167 ]> |
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
168 <book id="index" lang="$lang"> |
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
169 &documentation.xml; |
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
170 </book> |
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
171 EOF |
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
172 |
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
173 done |
10309
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
174 |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
175 echo "Looking for a valid XSLT processor..." |
29968
4e0ff9be2b1e
Avoid '&>' bashism for redirecting both stdout and stderr.
diego
parents:
29263
diff
changeset
|
176 if xsltproc --version > /dev/null 2>&1 |
10309
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
177 then |
10912 | 178 if test -z "$_fake_chunk_xsl" |
10309
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
179 then |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
180 echo "Found xsltproc. If it works, it's probably the best choice." |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
181 if test -n "$_catalog" |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
182 then |
31472
f5b66007c5e1
Get rid of xsltproc wrapper redirection; run commands directly from make.
diego
parents:
31471
diff
changeset
|
183 _xsltcommand="xsltproc --catalogs -o \$\$1 \$\$2 \$\$3" |
10309
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
184 else |
31472
f5b66007c5e1
Get rid of xsltproc wrapper redirection; run commands directly from make.
diego
parents:
31471
diff
changeset
|
185 _xsltcommand="xsltproc -o \$\$1 \$\$2 \$\$3" |
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 else |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
188 echo "Found xsltproc but no stylesheets on your system." |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
189 echo "xsltproc is unusable without stylesheets." |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
190 fi |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
191 fi |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
192 |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
193 |
11206
e7534574320c
html.xsl ---> html-single.xsl + more consistency + small fixes
diego
parents:
11188
diff
changeset
|
194 echo "Searching for XML checker..." |
31770 | 195 if command -v xmllint > /dev/null 2>&1; then |
196 echo "Found xmllint" | |
197 if test -n "$_catalog"; then | |
198 _xmllint_command="xmllint --noout --noent --postvalid --catalogs \$*" | |
199 else | |
200 _xmllint_command="xmllint --noout --noent --postvalid \$*" | |
10309
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
201 fi |
31770 | 202 else |
11188
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
203 echo "Not found" |
10309
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
204 _xmllint_command=true |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
205 fi |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
206 |
31468
dbab16182ba2
Get rid of xmllint wrapper redirection; run commands directly from make.
diego
parents:
30990
diff
changeset
|
207 cat > xml.mak << EOF |
dbab16182ba2
Get rid of xmllint wrapper redirection; run commands directly from make.
diego
parents:
30990
diff
changeset
|
208 CATALOG = $_catalog |
dbab16182ba2
Get rid of xmllint wrapper redirection; run commands directly from make.
diego
parents:
30990
diff
changeset
|
209 XMLLINT_COMMAND = $_xmllint_command |
31472
f5b66007c5e1
Get rid of xsltproc wrapper redirection; run commands directly from make.
diego
parents:
31471
diff
changeset
|
210 XSLT_COMMAND = $_xsltcommand |
10309
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
211 EOF |