Mercurial > mplayer.hg
annotate DOCS/xml/configure @ 26720:d68c3cd43cd4
Change subtitle selection order by giving "indirect" ways of specifying the
desired subtitle track the least priority.
Selection of displayed subtitles by language (-slang) and default track
attribute is only performed if all other ways have failed. They are not
directly controllable by the user (especially default tracks), therefore they
should not override -sub, -vobsub and even auto-subs.
Based on a patch by Sergey Malkovsky (mplayer.win32_gmail_com).
author | eugeni |
---|---|
date | Mon, 12 May 2008 20:40:39 +0000 |
parents | 484bf3498911 |
children | d41a06f831ee |
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 |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
6 _xsltwrapper="xsltproc.sh" |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
7 _xmllintwrapper="xmllint.sh" |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
8 |
11817
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
9 echo "Searching for XML catalogs..." |
15132
f3617970ae22
Break overly long lines into something more manageable.
diego
parents:
13838
diff
changeset
|
10 for _try_catalog in \ |
f3617970ae22
Break overly long lines into something more manageable.
diego
parents:
13838
diff
changeset
|
11 /etc/sgml/catalog \ |
17239 | 12 /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
|
13 /opt/local/share/xml/docbook-xml/*/catalog.xml \ |
26149 | 14 /usr/share/sgml/docbook/*/*catalog \ |
15132
f3617970ae22
Break overly long lines into something more manageable.
diego
parents:
13838
diff
changeset
|
15 /usr/share/apps/ksgmltools2/customization/en/catalog \ |
f3617970ae22
Break overly long lines into something more manageable.
diego
parents:
13838
diff
changeset
|
16 /usr/share/sgml/catalog \ |
f3617970ae22
Break overly long lines into something more manageable.
diego
parents:
13838
diff
changeset
|
17 /usr/local/share/sgml/catalog \ |
f3617970ae22
Break overly long lines into something more manageable.
diego
parents:
13838
diff
changeset
|
18 /usr/lib/sgml/catalog \ |
f3617970ae22
Break overly long lines into something more manageable.
diego
parents:
13838
diff
changeset
|
19 /usr/local/lib/sgml/catalog \ |
f3617970ae22
Break overly long lines into something more manageable.
diego
parents:
13838
diff
changeset
|
20 /usr/share/docbook-xml42/catalog.xml \ |
f3617970ae22
Break overly long lines into something more manageable.
diego
parents:
13838
diff
changeset
|
21 /usr/share/sgml/docbook/xmlcatalog |
10309
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
22 do |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
23 if test -f "$_try_catalog" |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
24 then |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
25 _catalog=$_try_catalog |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
26 break |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
27 fi |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
28 done |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
29 |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
30 if test -n "$_catalog" |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
31 then |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
32 echo "Found SGML catalog at $_catalog" |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
33 _sgmlcatalog="export SGML_CATALOG_FILES=$_catalog" |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
34 else |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
35 echo "No SGML catalog found." |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
36 fi |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
37 |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
38 |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
39 |
11206
e7534574320c
html.xsl ---> html-single.xsl + more consistency + small fixes
diego
parents:
11188
diff
changeset
|
40 echo "Searching for stylesheets..." |
e7534574320c
html.xsl ---> html-single.xsl + more consistency + small fixes
diego
parents:
11188
diff
changeset
|
41 echo "Searching for html/chunk.xsl..." |
15132
f3617970ae22
Break overly long lines into something more manageable.
diego
parents:
13838
diff
changeset
|
42 for _try_chunk_xsl in \ |
26149 | 43 /usr/share/xml/docbook/*/html/chunk.xsl \ |
15132
f3617970ae22
Break overly long lines into something more manageable.
diego
parents:
13838
diff
changeset
|
44 /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/html/chunk.xsl \ |
f3617970ae22
Break overly long lines into something more manageable.
diego
parents:
13838
diff
changeset
|
45 /usr/share/sgml/docbook/yelp/docbook/html/chunk.xsl \ |
f3617970ae22
Break overly long lines into something more manageable.
diego
parents:
13838
diff
changeset
|
46 /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
|
47 /usr/local/share/sgml/docbook/yelp/docbook/html/chunk.xsl \ |
f3617970ae22
Break overly long lines into something more manageable.
diego
parents:
13838
diff
changeset
|
48 /usr/share/docbook-xsl/html/chunk.xsl \ |
17676 | 49 /usr/share/sgml/docbook/xsl-stylesheets*/html/chunk.xsl \ |
50 /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
|
51 /opt/local/share/xsl/docbook-xsl/html/chunk.xsl \ |
17676 | 52 |
10309
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
53 do |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
54 if test -f "$_try_chunk_xsl" |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
55 then |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
56 _chunk_xsl=$_try_chunk_xsl |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
57 break |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
58 fi |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
59 done |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
60 |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
61 if test -z "$_chunk_xsl" |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
62 then |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
63 _chunk_xsl=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/html/chunk.xsl |
10912 | 64 echo "Not found. Using default ($_chunk_xsl)" |
65 _fake_chunk_xsl=yes | |
10309
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
66 else |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
67 echo "Found chunk.xsl at $_chunk_xsl" |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
68 fi |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
69 |
11188
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
70 echo "Searching for html/docbook.xsl..." |
15132
f3617970ae22
Break overly long lines into something more manageable.
diego
parents:
13838
diff
changeset
|
71 for _try_docbook_xsl in \ |
26149 | 72 /usr/share/xml/docbook/*/html/docbook.xsl \ |
15132
f3617970ae22
Break overly long lines into something more manageable.
diego
parents:
13838
diff
changeset
|
73 /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/html/docbook.xsl \ |
f3617970ae22
Break overly long lines into something more manageable.
diego
parents:
13838
diff
changeset
|
74 /usr/share/sgml/docbook/yelp/docbook/html/docbook.xsl \ |
f3617970ae22
Break overly long lines into something more manageable.
diego
parents:
13838
diff
changeset
|
75 /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
|
76 /usr/local/share/sgml/docbook/yelp/docbook/html/docbook.xsl \ |
f3617970ae22
Break overly long lines into something more manageable.
diego
parents:
13838
diff
changeset
|
77 /usr/share/docbook-xsl/html/docbook.xsl \ |
17676 | 78 /usr/share/sgml/docbook/xsl-stylesheets*/html/docbook.xsl \ |
79 /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
|
80 /opt/local/share/xsl/docbook-xsl/html/docbook.xsl \ |
17676 | 81 |
11188
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
82 do |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
83 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
|
84 then |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
85 _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
|
86 break |
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 done |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
89 |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
90 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
|
91 then |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
92 _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
|
93 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
|
94 _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
|
95 else |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
96 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
|
97 fi |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
98 |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
99 cat > html-chunk.xsl << EOF |
20761 | 100 <?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
|
101 <!-- ************************************************** |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
102 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
|
103 ************************************************** --> |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
104 <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
|
105 version="1.0"> |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
106 |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
107 <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
|
108 <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
|
109 |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
110 </xsl:stylesheet> |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
111 EOF |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
112 |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
113 |
11206
e7534574320c
html.xsl ---> html-single.xsl + more consistency + small fixes
diego
parents:
11188
diff
changeset
|
114 cat > html-single.xsl << EOF |
20761 | 115 <?xml version="1.0" encoding="utf-8"?> |
10309
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
116 <!-- ************************************************** |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
117 This file is generated automatically. DO NOT EDIT. |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
118 ************************************************** --> |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
119 <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
|
120 version="1.0"> |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
121 |
11188
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
122 <xsl:import href="$_docbook_xsl"/> |
10309
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
123 <xsl:include href="html-common.xsl"/> |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
124 |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
125 </xsl:stylesheet> |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
126 EOF |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
127 |
11817
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
128 echo "Searching for DTD..." |
22496 | 129 #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
|
130 for _try_dtd in \ |
22496 | 131 /usr/share/xml/docbook/*/dtd/4*/docbookx.dtd \ |
17239 | 132 /usr/share/xml/docbook/*/docbookx.dtd \ |
22126 | 133 /usr/share/sgml/docbook/*/docbookx.dtd \ |
134 /usr/share/sgml/docbook/dtd/*/docbookx.dtd \ | |
135 /usr/share/sgml/docbook/dtd/xml/*/docbookx.dtd \ | |
136 /usr/share/docbook-xml*/docbookx.dtd \ | |
26021
69e007ee01d6
improve DTD dection of MacPort-install docbook package
gpoirier
parents:
22496
diff
changeset
|
137 /opt/local/share/xml/docbook*/*/docbookx.dtd \ |
22126 | 138 /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
|
139 do |
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
140 if test -f "$_try_dtd" |
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
141 then |
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
142 _dtd=$_try_dtd |
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
143 break |
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
144 fi |
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
145 done |
10309
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
146 |
11817
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
147 if test -z "$_dtd" |
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
148 then |
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
149 _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
|
150 echo "Not found. Using default ($_dtd)." |
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
151 else |
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
152 echo "Found docbookx.dtd at $_dtd" |
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
153 fi |
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
154 |
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
155 for lang in `grep 'SUBDIRS =' Makefile|cut -d= -f2`; do |
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
156 cat > $lang/main.xml << EOF |
20761 | 157 <?xml version="1.0" encoding="utf-8" standalone="no"?> |
20440 | 158 <!-- ************************************************** |
159 This file is generated automatically. DO NOT EDIT. | |
160 ************************************************** --> | |
11817
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
161 <!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
|
162 "$_dtd" |
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
163 [ |
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
164 EOF |
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
165 |
11827
bedae65be7d1
sort -u is equivalent to sort | uniq, hint by Dominik.
diego
parents:
11826
diff
changeset
|
166 for file in `find $lang en -name \*.xml -exec basename \{\} \; | sort -u`; do |
11817
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
167 echo '<!ENTITY '$file' SYSTEM "'$file'">' >> $lang/main.xml |
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
168 done |
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
169 |
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
170 cat >> $lang/main.xml << EOF |
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
171 ]> |
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
172 <book id="index" lang="$lang"> |
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
173 &documentation.xml; |
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
174 </book> |
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
175 EOF |
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
176 |
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
177 done |
10309
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
178 |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
179 echo "Looking for a valid XSLT processor..." |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
180 # Checks for xsltproc, then checks for the Saxon processor (it needs Java). |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
181 # Also checks for Jade/OpenJade. |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
182 #FIXME: Add support for the xalan/xalan2 XSLT processors. |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
183 |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
184 if xsltproc --version &> /dev/null |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
185 then |
10912 | 186 if test -z "$_fake_chunk_xsl" |
10309
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
187 then |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
188 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
|
189 if test -n "$_catalog" |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
190 then |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
191 _xsltcommand="xsltproc --catalogs -o \$1 \$2 \$3" |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
192 else |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
193 _xsltcommand="xsltproc -o \$1 \$2 \$3" |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
194 fi |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
195 else |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
196 echo "Found xsltproc but no stylesheets on your system." |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
197 echo "xsltproc is unusable without stylesheets." |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
198 fi |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
199 fi |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
200 |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
201 # xsltproc not found. |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
202 # Now try to find a good Java virtual machine. |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
203 # FIXME: We need more checks for Java virtual machines. |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
204 if test -z "$_xsltcommand" |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
205 then |
10912 | 206 #FIXME: Add more suitable machines!!! |
10309
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
207 for _try_java in java gij-3.3 gij-3.2 gij-3.1 gij-3.0 gij |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
208 do |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
209 if $_try_java --version > /dev/null 2>&1 || $_try_java -version > /dev/null 2>&1 |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
210 then |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
211 _java=$_try_java |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
212 break |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
213 fi |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
214 done |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
215 if test -z "$_java" |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
216 then |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
217 echo "Java VM not found." |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
218 else |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
219 # Try to find the right jar files for classpath. |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
220 # This must not trigger on something like saxon-fop-6.4.4.jar. |
15132
f3617970ae22
Break overly long lines into something more manageable.
diego
parents:
13838
diff
changeset
|
221 for _try_saxon_jar in \ |
f3617970ae22
Break overly long lines into something more manageable.
diego
parents:
13838
diff
changeset
|
222 /usr/share/java/saxon-[0-9]*.jar \ |
f3617970ae22
Break overly long lines into something more manageable.
diego
parents:
13838
diff
changeset
|
223 /usr/local/share/java/saxon-[0-9]*.jar \ |
f3617970ae22
Break overly long lines into something more manageable.
diego
parents:
13838
diff
changeset
|
224 /usr/share/java/saxon.jar \ |
f3617970ae22
Break overly long lines into something more manageable.
diego
parents:
13838
diff
changeset
|
225 /usr/local/share/java/saxon.jar |
10309
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
226 do |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
227 if test -f "$_try_saxon_jar" |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
228 then |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
229 _saxon_jar=$_try_saxon_jar |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
230 #Don't break to find the _latest_ saxon.jar. |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
231 fi |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
232 done |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
233 if test -n "$_saxon_jar" |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
234 then |
10912 | 235 if test -z "$_fake_chunk_xsl" |
10309
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
236 then |
11188
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
237 # _xsltcommand="cd \$1 && if test \"\`dirname \$2 | head -c 1\`\" = \".\" ; then $_java -classpath $_saxon_jar com.icl.saxon.StyleSheet \$_IN_DIR/\$3 \$_IN_DIR/\$2 ; else $_java -classpath $_saxon_jar com.icl.saxon.StyleSheet \$_IN_DIR/\$3 \$2 ;fi" |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
238 _xsltcommand=" |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
239 if test \"\`dirname \$2 | head -c 1\`\" = \".\" |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
240 then |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
241 _STYLESHEET=\$_IN_DIR/\$2 |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
242 else |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
243 _STYLESHEET=\$2 |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
244 fi |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
245 |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
246 if test -d \$1 |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
247 then |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
248 _DIRNAME=\"\$1\" |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
249 _OUTPUT=\"\" |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
250 else |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
251 _DIRNAME=\"\`dirname \$1\`\" |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
252 _OUTPUT=\"-o \`basename \$1\`\" |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
253 fi |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
254 |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
255 cd \$_DIRNAME && |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
256 java -classpath /usr/share/java/saxon.jar com.icl.saxon.StyleSheet \$_OUTPUT \$_IN_DIR/\$3 \$_STYLESHEET |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
257 " |
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
258 |
10309
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
259 echo "Found the Saxon XSLT Processor ($_saxon_jar), using Java VM '$_java'." |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
260 else |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
261 echo "Found the Saxon XSLT processor but no stylesheets on your system." |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
262 echo "Saxon is unusable without stylesheets." |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
263 fi |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
264 fi |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
265 fi |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
266 fi |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
267 |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
268 if test -z "$_xsltcommand" |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
269 then |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
270 # Java not found. |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
271 # now try openjade/jade. |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
272 for _try_jade in jade openjade |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
273 do |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
274 if command -v $_try_jade > /dev/null |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
275 then |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
276 _jade=$_try_jade |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
277 break |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
278 fi |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
279 done |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
280 if test -n "$_jade" |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
281 then |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
282 echo "xsltproc and Saxon XSLT processors not found." |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
283 echo "I will try to use OpenJade or Jade (using '$_jade')." |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
284 echo "They aren't (currently) fully supported, however." |
15132
f3617970ae22
Break overly long lines into something more manageable.
diego
parents:
13838
diff
changeset
|
285 for _try_docbook_dsl in \ |
f3617970ae22
Break overly long lines into something more manageable.
diego
parents:
13838
diff
changeset
|
286 /usr/share/sgml/docbook/stylesheet/dsssl/modular/html/docbook.dsl \ |
f3617970ae22
Break overly long lines into something more manageable.
diego
parents:
13838
diff
changeset
|
287 /usr/local/share/sgml/docbook/stylesheet/dsssl/modular/html/docbook.dsl |
10309
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
288 do |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
289 if test -f "$_try_docbook_dsl" |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
290 then |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
291 _docbook_dsl=$_try_docbook_dsl |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
292 break |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
293 fi |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
294 done |
15132
f3617970ae22
Break overly long lines into something more manageable.
diego
parents:
13838
diff
changeset
|
295 for _try_xml_dcl in \ |
f3617970ae22
Break overly long lines into something more manageable.
diego
parents:
13838
diff
changeset
|
296 /usr/share/sgml/declaration/xml.dcl \ |
f3617970ae22
Break overly long lines into something more manageable.
diego
parents:
13838
diff
changeset
|
297 /usr/local/share/sgml/declaration/xml.dcl |
10309
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
298 do |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
299 if test -f "$_try_xml_dcl" |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
300 then |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
301 _xml_dcl=$_try_xml_dcl |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
302 break |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
303 fi |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
304 done |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
305 if test "x$_docbook_dsl" = "x" -o "x$_xml_dcl" = "x" |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
306 then |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
307 echo "One of the files docbook.dsl and xml.dcl or both of them weren't found." |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
308 echo "Bailing out." |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
309 exit 1 |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
310 fi |
10351 | 311 _xsltcommand="cd \$1 && $_jade -t xml -d $_docbook_dsl $_xml_dcl \$_IN_DIR/\$3" |
10309
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
312 else |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
313 echo "No valid XSLT processor found." |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
314 echo "Bailing out." |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
315 exit 1 |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
316 fi |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
317 fi |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
318 |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
319 |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
320 |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
321 cat > $_xsltwrapper << EOF |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
322 #!/bin/sh |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
323 # ************************************************** |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
324 # This file is generated automatically. DO NOT EDIT. |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
325 # ************************************************** |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
326 # This is a small wrapper script around many ways to call the XSLT processor. |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
327 # It accepts 3 arguments: <output_dir> <stylesheet_name> <main XML file name> |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
328 _IN_DIR=\`pwd\` |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
329 |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
330 $_sgmlcatalog |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
331 $_xsltcommand |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
332 EOF |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
333 |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
334 chmod +x $_xsltwrapper |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
335 |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
336 |
11206
e7534574320c
html.xsl ---> html-single.xsl + more consistency + small fixes
diego
parents:
11188
diff
changeset
|
337 echo "Searching for XML checker..." |
10309
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
338 for _try_xmllint in xmllint |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
339 do |
11468 | 340 if command -v $_try_xmllint > /dev/null 2>&1 |
10309
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
341 then |
11817
19919e913e3d
Shiny new build system by Torinthiel, polished and improved by myself.
diego
parents:
11468
diff
changeset
|
342 echo "Found $_try_xmllint" |
10309
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
343 if test -n "$_catalog" |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
344 then |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
345 _xmllint_command="$_try_xmllint --noout --noent --postvalid --catalogs \$*" |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
346 else |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
347 _xmllint_command="$_try_xmllint --noout --noent --postvalid \$*" |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
348 fi |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
349 break |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
350 fi |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
351 done |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
352 |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
353 if test -z "$_xmllint_command" |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
354 then |
11188
6dfed0b2a300
Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
lumag
parents:
11012
diff
changeset
|
355 echo "Not found" |
10309
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
356 _xmllint_command=true |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
357 fi |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
358 |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
359 cat > $_xmllintwrapper << EOF |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
360 #!/bin/sh |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
361 # ************************************************** |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
362 # This file is generated automatically. DO NOT EDIT. |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
363 # ************************************************** |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
364 # This is a small wrapper for XML lintian programs. |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
365 $_sgmlcatalog |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
366 $_xmllint_command |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
367 EOF |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
368 |
3c0e1b182fbc
XML autoconfiguration by Dmitry Baryshkov <lumag@qnc.ru> with some
diego
parents:
diff
changeset
|
369 chmod +x $_xmllintwrapper |