comparison DOCS/xml/configure @ 11188:6dfed0b2a300

Add support for building all-in-one HTML docs. (Files go to DOCS/HTML-single)
author lumag
date Mon, 20 Oct 2003 09:56:48 +0000
parents ff06dcb06d93
children e7534574320c
comparison
equal deleted inserted replaced
11187:bd4a5a954644 11188:6dfed0b2a300
23 echo "No SGML catalog found." 23 echo "No SGML catalog found."
24 fi 24 fi
25 25
26 26
27 27
28 echo "Searching for stylesheet..." 28 echo "Searching stylesheets..."
29 echo "Searching html/chunk.xsl..."
29 for _try_chunk_xsl in /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/html/chunk.xsl /usr/share/sgml/docbook/yelp/docbook/html/chunk.xsl /usr/local/share/sgml/docbook/stylesheet/xsl/nwalsh/html/chunk.xsl /usr/local/share/sgml/docbook/yelp/docbook/html/chunk.xsl /usr/share/docbook-xsl/html/chunk.xsl 30 for _try_chunk_xsl in /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/html/chunk.xsl /usr/share/sgml/docbook/yelp/docbook/html/chunk.xsl /usr/local/share/sgml/docbook/stylesheet/xsl/nwalsh/html/chunk.xsl /usr/local/share/sgml/docbook/yelp/docbook/html/chunk.xsl /usr/share/docbook-xsl/html/chunk.xsl
30 do 31 do
31 if test -f "$_try_chunk_xsl" 32 if test -f "$_try_chunk_xsl"
32 then 33 then
33 _chunk_xsl=$_try_chunk_xsl 34 _chunk_xsl=$_try_chunk_xsl
41 echo "Not found. Using default ($_chunk_xsl)" 42 echo "Not found. Using default ($_chunk_xsl)"
42 _fake_chunk_xsl=yes 43 _fake_chunk_xsl=yes
43 else 44 else
44 echo "Found chunk.xsl at $_chunk_xsl" 45 echo "Found chunk.xsl at $_chunk_xsl"
45 fi 46 fi
47
48 echo "Searching for html/docbook.xsl..."
49 for _try_docbook_xsl in /usr/share/sgml/docbook/stylesheet/xsl/nwalsh/html/docbook.xsl /usr/share/sgml/docbook/yelp/docbook/html/docbook.xsl /usr/local/share/sgml/docbook/stylesheet/xsl/nwalsh/html/docbook.xsl /usr/local/share/sgml/docbook/yelp/docbook/html/docbook.xsl /usr/share/docbook-xsl/html/docbook.xsl
50 do
51 if test -f "$_try_docbook_xsl"
52 then
53 _docbook_xsl=$_try_docbook_xsl
54 break
55 fi
56 done
57
58 if test -z "$_docbook_xsl"
59 then
60 _docbook_xsl=/usr/share/sgml/docbook/stylesheet/xsl/nwalsh/html/docbook.xsl
61 echo "Not found. Using default ($_docbook_xsl)"
62 _fake_docbook_xsl=yes
63 else
64 echo "Found docbook.xsl at $_docbook_xsl"
65 fi
66
67 cat > html-chunk.xsl << EOF
68 <?xml version="1.0" encoding="ISO-8859-1"?>
69 <!-- **************************************************
70 This file is generated automatically. DO NOT EDIT.
71 ************************************************** -->
72 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
73 version="1.0">
74
75 <xsl:import href="$_chunk_xsl"/>
76 <xsl:include href="html-common.xsl"/>
77
78 </xsl:stylesheet>
79 EOF
80
46 81
47 cat > html.xsl << EOF 82 cat > html.xsl << EOF
48 <?xml version="1.0" encoding="ISO-8859-1"?> 83 <?xml version="1.0" encoding="ISO-8859-1"?>
49 <!-- ************************************************** 84 <!-- **************************************************
50 This file is generated automatically. DO NOT EDIT. 85 This file is generated automatically. DO NOT EDIT.
51 ************************************************** --> 86 ************************************************** -->
52 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" 87 <xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
53 version="1.0"> 88 version="1.0">
54 89
55 <xsl:import href="$_chunk_xsl"/> 90 <xsl:import href="$_docbook_xsl"/>
56 <xsl:include href="html-common.xsl"/> 91 <xsl:include href="html-common.xsl"/>
57 92
58 </xsl:stylesheet> 93 </xsl:stylesheet>
59 EOF 94 EOF
60 95
112 done 147 done
113 if test -n "$_saxon_jar" 148 if test -n "$_saxon_jar"
114 then 149 then
115 if test -z "$_fake_chunk_xsl" 150 if test -z "$_fake_chunk_xsl"
116 then 151 then
117 _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" 152 # _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"
153 _xsltcommand="
154 if test \"\`dirname \$2 | head -c 1\`\" = \".\"
155 then
156 _STYLESHEET=\$_IN_DIR/\$2
157 else
158 _STYLESHEET=\$2
159 fi
160
161 if test -d \$1
162 then
163 _DIRNAME=\"\$1\"
164 _OUTPUT=\"\"
165 else
166 _DIRNAME=\"\`dirname \$1\`\"
167 _OUTPUT=\"-o \`basename \$1\`\"
168 fi
169
170 cd \$_DIRNAME &&
171 java -classpath /usr/share/java/saxon.jar com.icl.saxon.StyleSheet \$_OUTPUT \$_IN_DIR/\$3 \$_STYLESHEET
172 "
173
118 echo "Found the Saxon XSLT Processor ($_saxon_jar), using Java VM '$_java'." 174 echo "Found the Saxon XSLT Processor ($_saxon_jar), using Java VM '$_java'."
119 else 175 else
120 echo "Found the Saxon XSLT processor but no stylesheets on your system." 176 echo "Found the Saxon XSLT processor but no stylesheets on your system."
121 echo "Saxon is unusable without stylesheets." 177 echo "Saxon is unusable without stylesheets."
122 fi 178 fi
187 EOF 243 EOF
188 244
189 chmod +x $_xsltwrapper 245 chmod +x $_xsltwrapper
190 246
191 247
192 248 echo "Searching xml checker..."
193 for _try_xmllint in xmllint 249 for _try_xmllint in xmllint
194 do 250 do
195 if command -v $_try_xmllint 251 if command -v $_try_xmllint > /dev/null
196 then 252 then
253 echo "Found: $_try_xmllint"
197 if test -n "$_catalog" 254 if test -n "$_catalog"
198 then 255 then
199 _xmllint_command="$_try_xmllint --noout --noent --postvalid --catalogs \$*" 256 _xmllint_command="$_try_xmllint --noout --noent --postvalid --catalogs \$*"
200 else 257 else
201 _xmllint_command="$_try_xmllint --noout --noent --postvalid \$*" 258 _xmllint_command="$_try_xmllint --noout --noent --postvalid \$*"
204 fi 261 fi
205 done 262 done
206 263
207 if test -z "$_xmllint_command" 264 if test -z "$_xmllint_command"
208 then 265 then
266 echo "Not found"
209 _xmllint_command=true 267 _xmllint_command=true
210 fi 268 fi
211 269
212 cat > $_xmllintwrapper << EOF 270 cat > $_xmllintwrapper << EOF
213 #!/bin/sh 271 #!/bin/sh