source: LFS/lfs.xsl@ adbd09b

ablfs-more legacy trunk
Last change on this file since adbd09b was adbd09b, checked in by Pierre Labastie <pierre@…>, 5 years ago

LFS/lfs.xsl: Update directory layout of PKG_DEST

  • Do not symlink /{usr/,}lib64->lib
  • Do not symlink /usr/{man,info}->share
  • Create /lib64 on x86_64
  • Create /usr/lib/pkgconfig
  • do not create /usr/lib/rpcsvc
  • check that a directory exists before testing its emptyness (for example, attr removes empty manx dirs)
  • Property mode set to 100644
File size: 45.2 KB
Line 
1<?xml version="1.0" encoding="ISO-8859-1"?>
2
3<!-- $Id$ -->
4
5<xsl:stylesheet
6 xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
7 xmlns:exsl="http://exslt.org/common"
8 extension-element-prefixes="exsl"
9 version="1.0">
10
11<!-- Parameters -->
12
13 <!-- which revision attribute to include: can only be sysv or systemd,
14 but we leave checking to the caller-->
15 <xsl:param name="revision" select="'sysv'"/>
16
17 <!-- use package management ?
18 n = no, original behavior
19 y = yes, add PKG_DEST to scripts in install commands of chapter06-08
20 -->
21 <xsl:param name="pkgmngt" select="'n'"/>
22
23 <!-- Package management with "porg style" ?
24 n = no, same as pkgmngt description above
25 y = yes, wrap install commands of chapter06-08 into a bash function.
26 note that pkgmngt must be 'y' in this case
27 -->
28 <xsl:param name="wrap-install" select='"n"'/>
29
30 <!-- Run test suites?
31 0 = none
32 1 = only chapter06 critical testsuites
33 2 = all chapter06 testsuites
34 3 = all chapter05 and chapter06 testsuites
35 -->
36 <xsl:param name="testsuite" select="1"/>
37
38 <!-- Bomb on test suites failures?
39 n = no, I want to build the full system and review the logs
40 y = yes, bomb at the first test suite failure to can review the build dir
41 -->
42 <xsl:param name="bomb-testsuite" select="'n'"/>
43
44 <!-- Install vim-lang package? OBSOLETE should always be 'n'-->
45 <xsl:param name="vim-lang" select="'n'"/>
46
47 <!-- Should we strip excutables and libraries? -->
48 <xsl:param name='strip' select="'n'"/>
49
50 <!-- Should we remove .la files after chapter 5 and chapter 6? -->
51 <xsl:param name='del-la-files' select="'y'"/>
52
53 <!-- Time zone -->
54 <xsl:param name="timezone" select="'GMT'"/>
55
56 <!-- Page size -->
57 <xsl:param name="page" select="'letter'"/>
58
59 <!-- Locale settings -->
60 <xsl:param name="lang" select="'C'"/>
61
62 <!-- Install the whole set of locales -->
63 <xsl:param name='full-locale' select='"n"'/>
64
65 <!-- Hostname -->
66 <xsl:param name='hostname' select='"HOSTNAME"'/>
67
68 <!-- Network parameters: interface, ip, gateway, prefix, broadcast, domain
69 and nameservers -->
70 <xsl:param name='interface' select="'eth0'"/>
71 <xsl:param name='ip' select='"10.0.2.9"'/>
72 <xsl:param name='gateway' select='"10.0.2.2"'/>
73 <xsl:param name='prefix' select='24'/>
74 <xsl:param name='broadcast' select='"10.0.2.255"'/>
75 <xsl:param name='domain' select='"lfs.org"'/>
76 <xsl:param name='nameserver1' select='"10.0.2.3"'/>
77 <xsl:param name='nameserver2' select='"8.8.8.8"'/>
78
79 <!-- Console parameters: font, fontmap, unicode (y/n), keymap, local (y:
80 hardware clock set to local time/n:hardware clock set to UTC)
81 and log-level -->
82 <xsl:param name='font' select="'lat0-16'"/>
83 <xsl:param name='keymap' select="'us'"/>
84 <xsl:param name='local' select="'n'"/>
85 <xsl:param name='log-level' select="'4'"/>
86
87<!-- End parameters -->
88
89 <xsl:template match="/">
90 <xsl:apply-templates select="//sect1[not(@revision) or
91 @revision=$revision]"/>
92 </xsl:template>
93
94 <xsl:template match="sect1">
95<!-- Since this xsl:if tag encloses the whole template, it would
96 be much better to transpose this condition to the select part
97 of the "calling" apply-template. But that would change the numbering,
98 so that it would be difficult to compare to previous versions. So for
99 version 2.4, let us keep this -->
100 <xsl:if test="(../@id='chapter-temporary-tools' or
101 ../@id='chapter-building-system' or
102 ../@id='chapter-bootscripts' or
103 ../@id='chapter-bootable') and
104 (sect2[not(@revision) or @revision=$revision]//..|.)/
105 screen[(not(@role) or @role != 'nodump') and
106 (not(@revision) or @revision=$revision)]/
107 userinput[not(starts-with(string(),'chroot'))]">
108<!-- The last condition is a hack to allow previous versions of the
109 book where the chroot commands did not have role="nodump".
110 It only works if the chroot command is the only one on the page -->
111 <!-- The dirs names -->
112 <xsl:variable name="pi-dir" select="../processing-instruction('dbhtml')"/>
113 <xsl:variable name="pi-dir-value" select="substring-after($pi-dir,'dir=')"/>
114 <xsl:variable name="quote-dir" select="substring($pi-dir-value,1,1)"/>
115 <xsl:variable name="dirname" select="substring-before(substring($pi-dir-value,2),$quote-dir)"/>
116 <!-- The file names -->
117 <xsl:variable name="pi-file" select="processing-instruction('dbhtml')"/>
118 <xsl:variable name="pi-file-value" select="substring-after($pi-file,'filename=')"/>
119 <xsl:variable name="filename" select="substring-before(substring($pi-file-value,2),'.html')"/>
120 <!-- The build order -->
121 <xsl:variable name="position" select="position()"/>
122 <xsl:variable name="order">
123 <xsl:choose>
124 <xsl:when test="string-length($position) = 1">
125 <xsl:text>00</xsl:text>
126 <xsl:value-of select="$position"/>
127 </xsl:when>
128 <xsl:when test="string-length($position) = 2">
129 <xsl:text>0</xsl:text>
130 <xsl:value-of select="$position"/>
131 </xsl:when>
132 <xsl:otherwise>
133 <xsl:value-of select="$position"/>
134 </xsl:otherwise>
135 </xsl:choose>
136 </xsl:variable>
137 <!-- Inclusion of package manager scriptlets -->
138 <xsl:if test="@id='ch-tools-stripping' and $pkgmngt='y'">
139 <xsl:apply-templates
140 select="document('packageManager.xml')//sect1[contains(@id,'ch-tools')]"
141 mode="pkgmngt">
142 <xsl:with-param name="order" select="$order"/>
143 <xsl:with-param name="dirname" select="$dirname"/>
144 </xsl:apply-templates>
145 </xsl:if>
146 <xsl:if test="@id='ch-system-strippingagain' and $pkgmngt='y'">
147 <xsl:apply-templates
148 select="document('packageManager.xml')//sect1[contains(@id,'ch-system')]"
149 mode="pkgmngt">
150 <xsl:with-param name="order" select="$order"/>
151 <xsl:with-param name="dirname" select="$dirname"/>
152 </xsl:apply-templates>
153 </xsl:if>
154 <!-- Creating dirs and files -->
155 <exsl:document href="{$dirname}/{$order}-{$filename}" method="text">
156 <xsl:choose>
157 <xsl:when test="@id='ch-system-creatingdirs' or
158 @id='ch-system-createfiles' or
159 @id='ch-system-strippingagain'">
160 <xsl:text>#!/tools/bin/bash&#xA;set +h&#xA;</xsl:text>
161 </xsl:when>
162 <xsl:otherwise>
163 <xsl:text>#!/bin/bash&#xA;set +h&#xA;</xsl:text>
164 </xsl:otherwise>
165 </xsl:choose>
166 <xsl:if test="not(@id='ch-tools-stripping') and
167 not(@id='ch-system-strippingagain')">
168 <xsl:text>set -e&#xA;</xsl:text>
169 </xsl:if>
170 <xsl:text>&#xA;</xsl:text>
171 <xsl:if test="sect2[@role='installation']">
172 <xsl:text>cd $PKGDIR&#xA;</xsl:text>
173 </xsl:if>
174 <xsl:apply-templates select="sect2[not(@revision) or
175 @revision=$revision] |
176 screen[(not(@role) or
177 @role!='nodump') and
178 (not(@revision) or
179 @revision=$revision)]/userinput"/>
180 <xsl:if test="@id='ch-system-creatingdirs' and $pkgmngt='y'">
181 <xsl:apply-templates
182 select="document('packageManager.xml')//sect1[
183 @id='ch-pkgmngt-creatingdirs'
184 ]//userinput"
185 mode="pkgmngt"/>
186 </xsl:if>
187 <xsl:if test="@id='ch-system-createfiles' and $pkgmngt='y'">
188 <xsl:apply-templates
189 select="document('packageManager.xml')//sect1[
190 @id='ch-pkgmngt-createfiles'
191 ]//userinput"
192 mode="pkgmngt"/>
193 </xsl:if>
194 <xsl:text>echo -e "\n\nTotalseconds: $SECONDS\n"&#xA;</xsl:text>
195 <xsl:text>exit&#xA;</xsl:text>
196 </exsl:document>
197 </xsl:if>
198 </xsl:template>
199
200 <xsl:template match="sect2">
201 <xsl:apply-templates
202 select=".//screen[(not(@role) or
203 @role != 'nodump') and
204 (not(@revision) or
205 @revision=$revision)]/userinput[
206 @remap = 'pre' or
207 @remap = 'configure' or
208 @remap = 'make' or
209 @remap = 'test' and
210 not(current()/../@id='ch-tools-dejagnu') and
211 not(current()/../@id='ch-system-systemd')]"/>
212 <xsl:if
213 test="ancestor::chapter[@id != 'chapter-temporary-tools'] and
214 $pkgmngt = 'y' and
215 descendant::screen[not(@role) or
216 @role != 'nodump']/userinput[
217 @remap='install']">
218 <xsl:choose>
219 <xsl:when test="$wrap-install='y'">
220 <xsl:text>wrapInstall '
221</xsl:text>
222 </xsl:when>
223 <xsl:otherwise>
224<!-- We cannot know which directory(ies) are needed by the package. Create a
225 reasonable bunch of them. Should be close to "Creating Directories".-->
226 <xsl:text>mkdir -pv $PKG_DEST/{bin,boot,etc,lib,sbin}
227mkdir -pv $PKG_DEST/usr/{bin,include,lib/pkgconfig,sbin}
228mkdir -pv $PKG_DEST/usr/share/{doc,info,man}
229mkdir -pv $PKG_DEST/usr/share/man/man{1..8}
230case $(uname -m) in
231 x86_64) mkdir -v $PKG_DEST/lib64 ;;
232esac
233</xsl:text>
234 </xsl:otherwise>
235 </xsl:choose>
236 </xsl:if>
237 <xsl:apply-templates
238 select=".//screen[(not(@role) or
239 @role != 'nodump') and
240 (not(@revision) or
241 @revision=$revision)]/userinput[@remap = 'install']"/>
242 <xsl:if test="ancestor::chapter[@id != 'chapter-temporary-tools'] and
243 descendant::screen[not(@role) or
244 @role != 'nodump']/userinput[
245 @remap='install']">
246 <xsl:choose>
247 <xsl:when test="$pkgmngt='n'"/>
248 <xsl:when test="$wrap-install='y'">
249 <xsl:if test="../@id = 'ch-system-man-pages'">
250<!-- these files are provided by the shadow package -->
251 <xsl:text>rm -fv /usr/share/man/{man3/getspnam.3,man5/passwd.5}
252</xsl:text>
253 </xsl:if>
254<!-- Attr man/man2 pages are already installed by man-pages. As of
255 March 2013, they are the same pages.
256 November 2015: now they are more accurate
257 in man-pages, and the man5 section is also in man-pages... -->
258 <xsl:if test="../@id = 'ch-system-attr'">
259 <xsl:text>rm -fv /usr/share/man/man2/*
260rm -fv /usr/share/man/man5/*
261</xsl:text>
262 </xsl:if>
263<!-- nologin is installed by util-linux. remove it from shadow -->
264 <xsl:if test="../@id = 'ch-system-shadow'">
265 <xsl:text>rm -fv /usr/share/man/man8/nologin.8
266rm -fv /sbin/nologin
267</xsl:text>
268 </xsl:if>
269 <xsl:text>'
270PREV_SEC=${SECONDS}
271packInstall
272SECONDS=${PREV_SEC}
273</xsl:text>
274 </xsl:when>
275 <xsl:otherwise>
276 <xsl:if test="../@id = 'ch-system-man-pages'">
277<!-- these files are provided by the shadow package -->
278 <xsl:text>rm -fv $PKG_DEST/usr/share/man/{man3/getspnam.3,man5/passwd.5}
279</xsl:text>
280 </xsl:if>
281<!-- Attr man/man2 pages are already installed by man-pages. As of
282 March 2013, they are the same pages.
283 November 2015: now they are more accurate
284 in man-pages, and the man5 section is also in man-pages... -->
285 <xsl:if test="../@id = 'ch-system-attr'">
286 <xsl:text>rm -fv $PKG_DEST/usr/share/man/man2/*
287rm -fv $PKG_DEST/usr/share/man/man5/*
288</xsl:text>
289 </xsl:if>
290<!-- nologin is installed by util-linux. remove it from shadow -->
291 <xsl:if test="../@id = 'ch-system-shadow'">
292 <xsl:text>rm -fv $PKG_DEST/usr/share/man/man8/nologin.8
293rm -fv $PKG_DEST/sbin/nologin
294</xsl:text>
295 </xsl:if>
296<!-- remove empty directories -->
297 <xsl:text>for dir in $PKG_DEST/usr/share/man/man{1..8} \
298 $PKG_DEST/usr/share/{doc,info,man} \
299 $PKG_DEST/usr/lib/pkgconfig \
300 $PKG_DEST/usr/{lib,bin,sbin,include} \
301 $PKG_DEST/{boot,etc,lib,bin,sbin}; do
302 [ -d "$dir" ] &amp;&amp; [ -z "$(ls $dir)" ] &amp;&amp; rmdir -v $dir
303done
304[ -d $PKG_DEST/lib64 ] &amp;&amp; [ -z "$(ls $PKG_DEST/lib64)" ] &amp;&amp;
305 rmdir -v $PKG_DEST/lib64
306PREV_SEC=${SECONDS}
307packInstall
308SECONDS=${PREV_SEC}
309rm -rf $PKG_DEST
310</xsl:text>
311 </xsl:otherwise>
312 </xsl:choose>
313 </xsl:if>
314 <xsl:if test="$testsuite='3' and
315 ../@id='ch-tools-glibc' and
316 @role='installation'">
317 <xsl:copy-of select="//userinput[@remap='locale-test']"/>
318 <xsl:text>&#xA;</xsl:text>
319 </xsl:if>
320 <xsl:if test="../@id='ch-system-glibc' and @role='installation'">
321 <xsl:choose>
322 <xsl:when test="$full-locale='y'">
323 <xsl:copy-of select="//userinput[@remap='locale-full']"/>
324 <xsl:text>&#xA;</xsl:text>
325 </xsl:when>
326 <xsl:otherwise>
327 <xsl:copy-of select="//userinput[@remap='locale-test']"/>
328 <xsl:text>&#xA;</xsl:text>
329 <xsl:if test="not(contains(string(//userinput[@remap='locale-test']),$lang)) and $lang!='C' and $lang!='POSIX'">
330 <xsl:text>if LOCALE=`grep "</xsl:text>
331 <xsl:value-of select="$lang"/>
332 <xsl:text>/" $PKGDIR/localedata/SUPPORTED`; then
333 CHARMAP=`echo $LOCALE | sed 's,[^/]*/\([^ ]*\) [\],\1,'`
334 INPUT=`echo $LOCALE | sed 's,[/.].*,,'`
335 LOCALE=`echo $LOCALE | sed 's,/.*,,'`
336 localedef -i $INPUT -f $CHARMAP $LOCALE
337fi
338</xsl:text>
339 </xsl:if>
340 </xsl:otherwise>
341 </xsl:choose>
342 </xsl:if>
343 <xsl:apply-templates
344 select=".//screen[
345 (not(@role) or
346 @role != 'nodump') and
347 (not(@revision) or
348 @revision=$revision)
349 ]/userinput[
350 not(@remap) or
351 @remap='adjust' or
352 @remap='test' and current()/../@id='ch-tools-dejagnu' or
353 @remap='test' and current()/../@id='ch-system-systemd'
354 ]"/>
355 </xsl:template>
356
357 <xsl:template match="sect1" mode="pkgmngt">
358 <xsl:param name="dirname" select="chapter05"/>
359 <!-- The build order -->
360 <xsl:param name="order" select="062"/>
361<!-- The file names -->
362 <xsl:variable name="pi-file" select="processing-instruction('dbhtml')"/>
363 <xsl:variable name="pi-file-value" select="substring-after($pi-file,'filename=')"/>
364 <xsl:variable name="filename" select="substring-before(substring($pi-file-value,2),'.html')"/>
365 <!-- Creating dirs and files -->
366 <xsl:if test="count(descendant::screen/userinput) &gt; 0 and
367 count(descendant::screen/userinput) &gt;
368 count(descendant::screen[@role='nodump'])">
369 <exsl:document href="{$dirname}/{$order}-{position()}-{$filename}"
370 method="text">
371 <xsl:text>#!/bin/bash
372set +h
373set -e
374
375cd $PKGDIR
376</xsl:text>
377 <xsl:apply-templates
378 select=".//screen[not(@role) or
379 @role != 'nodump']/userinput[@remap != 'adjust']"
380 mode="pkgmngt"/>
381 <xsl:if test="$dirname = 'chapter06'">
382 <xsl:text>PREV_SEC=${SECONDS}
383packInstall
384SECONDS=${PREV_SEC}
385rm -rf "$PKG_DEST"
386</xsl:text>
387 </xsl:if>
388 <xsl:apply-templates
389 select=".//screen[not(@role) or
390 @role != 'nodump'
391 ]/userinput[not(@remap) or
392 @remap='adjust'
393 ]"
394 mode="pkgmngt"/>
395 <xsl:text>
396echo -e "\n\nTotalseconds: $SECONDS\n"
397exit
398</xsl:text>
399 </exsl:document>
400 </xsl:if>
401 </xsl:template>
402
403 <xsl:template match="userinput" mode="pkgmngt">
404 <xsl:apply-templates/>
405 <xsl:text>&#xA;</xsl:text>
406 </xsl:template>
407
408 <xsl:template match="userinput">
409 <xsl:choose>
410 <!-- Copying the kernel config file -->
411 <xsl:when test="string() = 'make mrproper'">
412 <xsl:text>make mrproper&#xA;</xsl:text>
413 <xsl:if test="ancestor::sect1[@id='ch-bootable-kernel']">
414 <xsl:text>cp -v ../kernel-config .config&#xA;</xsl:text>
415 </xsl:if>
416 </xsl:when>
417<!-- test instructions -->
418 <xsl:when test="@remap = 'test'">
419 <xsl:call-template name="comment-test">
420 <xsl:with-param name="instructions" select="string()"/>
421 </xsl:call-template>
422 </xsl:when>
423<!-- End of test instructions -->
424<!-- If the instructions contain "strip ", it may mean they contain also .la
425 file removal (and possibly other clean up). We therefore call a template
426 to comment them out appropriately and also to not stop if stripping
427 fails. -->
428 <xsl:when test="contains(string(),'strip ') or
429 contains(string(),'\*.la')">
430 <xsl:call-template name="comment-strip">
431 <xsl:with-param name="instructions" select="string()"/>
432 </xsl:call-template>
433 </xsl:when>
434<!-- Package management -->
435<!-- Add $PKG_DEST to installation commands -->
436 <xsl:when test="@remap='install' and
437 not(ancestor::chapter[
438 @id='chapter-temporary-tools'
439 ])">
440 <xsl:choose>
441 <xsl:when test="$pkgmngt='n'">
442 <xsl:choose>
443 <xsl:when test="contains(string(),'firmware,udev')">
444 <xsl:text>if [[ ! -d /lib/udev/devices ]] ; then&#xA;</xsl:text>
445 <xsl:apply-templates/>
446 <xsl:text>&#xA;fi&#xA;</xsl:text>
447 </xsl:when>
448 <xsl:otherwise>
449 <xsl:apply-templates/>
450 <xsl:text>&#xA;</xsl:text>
451 </xsl:otherwise>
452 </xsl:choose>
453 </xsl:when>
454 <xsl:when test="$wrap-install='y'">
455 <xsl:choose>
456 <xsl:when test="./literal">
457 <xsl:call-template name="output-wrap">
458 <xsl:with-param name="commands" select="text()[1]"/>
459 </xsl:call-template>
460 <xsl:apply-templates select="literal"/>
461 <xsl:call-template name="output-wrap">
462 <xsl:with-param name="commands" select="text()[2]"/>
463 </xsl:call-template>
464 </xsl:when>
465 <xsl:otherwise>
466 <xsl:call-template name="output-wrap">
467 <xsl:with-param name="commands" select="string()"/>
468 </xsl:call-template>
469 </xsl:otherwise>
470 </xsl:choose>
471 <xsl:text>&#xA;</xsl:text>
472 </xsl:when>
473 <xsl:otherwise><!--pkgmngt = 'y' and wrap-install='n'-->
474 <xsl:choose>
475 <xsl:when test="./literal">
476 <xsl:call-template name="outputpkgdest">
477 <xsl:with-param name="outputstring" select="text()[1]"/>
478 </xsl:call-template>
479 <xsl:apply-templates select="literal"/>
480 <xsl:call-template name="outputpkgdest">
481 <xsl:with-param name="outputstring" select="text()[2]"/>
482 </xsl:call-template>
483 </xsl:when>
484 <xsl:otherwise>
485 <xsl:call-template name="outputpkgdest">
486 <xsl:with-param name="outputstring" select="string()"/>
487 </xsl:call-template>
488 </xsl:otherwise>
489 </xsl:choose>
490 <xsl:text>&#xA;</xsl:text>
491 </xsl:otherwise>
492 </xsl:choose>
493 </xsl:when> <!-- @remap='install' -->
494 <!-- if package management, we should make an independant package for
495 tzdata. -->
496 <xsl:when test="contains(string(),'tzdata') and $pkgmngt='y'">
497 <xsl:text>
498OLD_PKG_DEST="$PKG_DEST"
499OLD_PKGDIR=$PKGDIR
500PKG_DEST=$(dirname $OLD_PKG_DEST)/001-tzdata
501PKGDIR=$(dirname $PKGDIR)/tzdata-</xsl:text>
502 <xsl:copy-of select="substring-before(
503 substring-after(string(),'tzdata'),
504 '.tar')"/>
505 <xsl:text>
506</xsl:text>
507 <xsl:choose>
508 <xsl:when test="$wrap-install='n'">
509 <xsl:copy-of select="substring-before(string(),'ZONEINFO=')"/>
510 <xsl:text>ZONEINFO=$PKG_DEST</xsl:text>
511 <xsl:copy-of select="substring-after(string(),'ZONEINFO=')"/>
512 <xsl:text>
513PREV_SEC=${SECONDS}
514packInstall
515SECONDS=${PREV_SEC}
516rm -rf $PKG_DEST
517</xsl:text>
518 </xsl:when>
519 <xsl:otherwise><!-- wrap-install='y' -->
520 <xsl:copy-of select="substring-before(string(),'ZONEINFO=')"/>
521 <xsl:text>
522wrapInstall '
523ZONEINFO=</xsl:text>
524 <xsl:copy-of select="substring-after(string(),'ZONEINFO=')"/>
525 <xsl:text>'
526PREV_SEC=${SECONDS}
527packInstall
528SECONDS=${PREV_SEC}
529</xsl:text>
530 </xsl:otherwise>
531 </xsl:choose>
532 <xsl:text>
533PKG_DEST=$OLD_PKG_DEST
534unset OLD_PKG_DEST
535PKGDIR=$OLD_PKGDIR
536unset OLD_PKGDIR
537</xsl:text>
538 </xsl:when><!-- addition for tzdata + package management -->
539 <!-- End addition for package management -->
540 <!-- The rest of commands -->
541 <xsl:otherwise>
542 <xsl:apply-templates/>
543 <xsl:text>&#xA;</xsl:text>
544 </xsl:otherwise>
545 </xsl:choose>
546 </xsl:template>
547
548 <xsl:template match="replaceable">
549 <xsl:choose>
550 <xsl:when test="ancestor::sect1[@id='ch-system-glibc']">
551 <xsl:value-of select="$timezone"/>
552 </xsl:when>
553 <xsl:when test="ancestor::sect1[@id='ch-system-groff']">
554 <xsl:value-of select="$page"/>
555 </xsl:when>
556 <xsl:when test="contains(string(.),'&lt;ll&gt;_&lt;CC&gt;')">
557 <xsl:value-of select="$lang"/>
558 </xsl:when>
559 <xsl:when test="contains(string(.),'Domain')">
560 <xsl:value-of select="$domain"/>
561 </xsl:when>
562 <xsl:when test="contains(string(.),'primary')">
563 <xsl:value-of select="$nameserver1"/>
564 </xsl:when>
565 <xsl:when test="contains(string(.),'secondary')">
566 <xsl:value-of select="$nameserver2"/>
567 </xsl:when>
568 <xsl:when test="contains(string(.),'192.168.1.1')">
569 <xsl:value-of select="$ip"/>
570 </xsl:when>
571 <xsl:when test="contains(string(.),'192.168.0.2')">
572 <xsl:value-of select="$ip"/>
573 </xsl:when>
574 <xsl:when test="contains(string(.),'eth0')">
575 <xsl:value-of select="$interface"/>
576 </xsl:when>
577<!-- Only adapted to LFS-20170310 and later -->
578 <xsl:when test="contains(string(.),'HOSTNAME')">
579 <xsl:value-of select="$hostname"/>
580 </xsl:when>
581 <xsl:when test="contains(string(.),'FQDN')">
582 <xsl:value-of select="$hostname"/>
583 <xsl:text>.</xsl:text>
584 <xsl:value-of select="$domain"/>
585 </xsl:when>
586 <xsl:when test="contains(string(.),'alias')"/>
587 <xsl:when test="contains(string(.),'&lt;lfs&gt;')">
588 <xsl:value-of select="$hostname"/>
589 </xsl:when>
590 <xsl:otherwise>
591 <xsl:text>**EDITME</xsl:text>
592 <xsl:apply-templates/>
593 <xsl:text>EDITME**</xsl:text>
594 </xsl:otherwise>
595 </xsl:choose>
596 </xsl:template>
597
598 <xsl:template match="literal">
599 <xsl:choose>
600 <xsl:when test="contains(string(),'ONBOOT')">
601 <xsl:call-template name="outputnet">
602 <xsl:with-param name="netstring" select="string()"/>
603 </xsl:call-template>
604 </xsl:when>
605 <xsl:when test="contains(string(),'[Match]')">
606 <xsl:call-template name="outputsysdnet">
607 <xsl:with-param name="netstring" select="string()"/>
608 </xsl:call-template>
609 </xsl:when>
610 <xsl:when test="contains(string(),'0.0 0 0.0')">
611 <xsl:copy-of select="substring-before(string(),'LOCAL')"/>
612 <xsl:if test="$local='y'"><xsl:text>LOCAL</xsl:text></xsl:if>
613 <xsl:if test="$local='n'"><xsl:text>UTC</xsl:text></xsl:if>
614 </xsl:when>
615 <xsl:when test="contains(string(),'UTC=1')">
616 <xsl:copy-of select="substring-before(string(),'1')"/>
617 <xsl:if test="$local='y'"><xsl:text>0</xsl:text></xsl:if>
618 <xsl:if test="$local='n'"><xsl:text>1</xsl:text></xsl:if>
619 <xsl:copy-of select="substring-after(string(),'1')"/>
620 </xsl:when>
621 <xsl:when test="contains(string(),'bg_bds-')">
622 <xsl:call-template name="outputsysvconsole">
623 <xsl:with-param name="consolestring" select="string()"/>
624 </xsl:call-template>
625 </xsl:when>
626 <xsl:when test="contains(string(),'de-latin1')">
627 <xsl:call-template name="outputsysdconsole">
628 <xsl:with-param name="consolestring" select="string()"/>
629 </xsl:call-template>
630 </xsl:when>
631 <xsl:otherwise>
632 <xsl:apply-templates/>
633 </xsl:otherwise>
634 </xsl:choose>
635 </xsl:template>
636
637 <xsl:template name="outputnet">
638 <xsl:param name="netstring" select="''"/>
639 <!-- We suppose that book example has the following values:
640 - interface: eth0
641 - ip: 192.168.1.2
642 - gateway: 192.168.1.1
643 - prefix: 24
644 - broadcast: 192.168.1.255
645 Change below if book changes -->
646 <xsl:choose>
647 <xsl:when test="contains($netstring,'eth0')">
648 <xsl:call-template name="outputnet">
649 <xsl:with-param name="netstring"
650 select="substring-before($netstring,'eth0')"/>
651 </xsl:call-template>
652 <xsl:value-of select="$interface"/>
653 <xsl:call-template name="outputnet">
654 <xsl:with-param name="netstring"
655 select="substring-after($netstring,'eth0')"/>
656 </xsl:call-template>
657 </xsl:when>
658 <xsl:when test="contains($netstring,'192.168.1.1')">
659 <xsl:call-template name="outputnet">
660 <xsl:with-param name="netstring"
661 select="substring-before($netstring,'192.168.1.1')"/>
662 </xsl:call-template>
663 <xsl:value-of select="$gateway"/>
664 <xsl:call-template name="outputnet">
665 <xsl:with-param name="netstring"
666 select="substring-after($netstring,'192.168.1.1')"/>
667 </xsl:call-template>
668 </xsl:when>
669 <!-- must test this before the following, because 192.168.1.255 contains
670 192.168.1.2! -->
671 <xsl:when test="contains($netstring,'192.168.1.255')">
672 <xsl:call-template name="outputnet">
673 <xsl:with-param name="netstring"
674 select="substring-before($netstring,'192.168.1.255')"/>
675 </xsl:call-template>
676 <xsl:value-of select="$broadcast"/>
677 <xsl:call-template name="outputnet">
678 <xsl:with-param name="netstring"
679 select="substring-after($netstring,'192.168.1.255')"/>
680 </xsl:call-template>
681 </xsl:when>
682 <xsl:when test="contains($netstring,'192.168.1.2')">
683 <xsl:call-template name="outputnet">
684 <xsl:with-param name="netstring"
685 select="substring-before($netstring,'192.168.1.2')"/>
686 </xsl:call-template>
687 <xsl:value-of select="$ip"/>
688 <xsl:call-template name="outputnet">
689 <xsl:with-param name="netstring"
690 select="substring-after($netstring,'192.168.1.2')"/>
691 </xsl:call-template>
692 </xsl:when>
693 <xsl:when test="contains($netstring,'24')">
694 <xsl:call-template name="outputnet">
695 <xsl:with-param name="netstring"
696 select="substring-before($netstring,'24')"/>
697 </xsl:call-template>
698 <xsl:value-of select="$prefix"/>
699 <xsl:call-template name="outputnet">
700 <xsl:with-param name="netstring"
701 select="substring-after($netstring,'24')"/>
702 </xsl:call-template>
703 </xsl:when>
704 <xsl:otherwise>
705 <xsl:value-of select="$netstring"/>
706 </xsl:otherwise>
707 </xsl:choose>
708 </xsl:template>
709
710 <xsl:template name="outputsysdnet">
711 <xsl:param name="netstring" select="''"/>
712 <!-- We suppose that book example has the following values:
713 - interface: <network-device-name>
714 - ip: 192.168.0.2
715 - gateway: 192.168.0.1
716 - prefix: 24
717 - DNS: 192.168.0.1
718 - Domain: <Your Domain Name>
719 and gateway comes before DNS. Change below if book changes -->
720 <xsl:choose>
721 <xsl:when test="contains($netstring,'&lt;network-device-name&gt;')">
722 <xsl:call-template name="outputsysdnet">
723 <xsl:with-param name="netstring"
724 select="substring-before($netstring,'&lt;network-device-name&gt;')"/>
725 </xsl:call-template>
726 <xsl:value-of select="$interface"/>
727 <xsl:call-template name="outputsysdnet">
728 <xsl:with-param name="netstring"
729 select="substring-after($netstring,'&lt;network-device-name&gt;')"/>
730 </xsl:call-template>
731 </xsl:when>
732 <xsl:when test="contains($netstring,'192.168.0.1') and
733 contains($netstring,'Gateway')">
734 <xsl:call-template name="outputsysdnet">
735 <xsl:with-param name="netstring"
736 select="substring-before($netstring,'192.168.0.1')"/>
737 </xsl:call-template>
738 <xsl:value-of select="$gateway"/>
739 <xsl:call-template name="outputsysdnet">
740 <xsl:with-param name="netstring"
741 select="substring-after($netstring,'192.168.0.1')"/>
742 </xsl:call-template>
743 </xsl:when>
744 <xsl:when test="contains($netstring,'192.168.0.1') and
745 not(contains($netstring,'Gateway'))">
746 <xsl:call-template name="outputsysdnet">
747 <xsl:with-param name="netstring"
748 select="substring-before($netstring,'192.168.0.1')"/>
749 </xsl:call-template>
750 <xsl:value-of select="$nameserver1"/>
751 <xsl:text>
752DNS=</xsl:text>
753 <xsl:value-of select="$nameserver2"/>
754 <xsl:call-template name="outputsysdnet">
755 <xsl:with-param name="netstring"
756 select="substring-after($netstring,'192.168.0.1')"/>
757 </xsl:call-template>
758 </xsl:when>
759 <xsl:when test="contains($netstring,'192.168.0.2')">
760 <xsl:call-template name="outputsysdnet">
761 <xsl:with-param name="netstring"
762 select="substring-before($netstring,'192.168.0.2')"/>
763 </xsl:call-template>
764 <xsl:value-of select="$ip"/>
765 <xsl:call-template name="outputsysdnet">
766 <xsl:with-param name="netstring"
767 select="substring-after($netstring,'192.168.0.2')"/>
768 </xsl:call-template>
769 </xsl:when>
770 <xsl:when test="contains($netstring,'24')">
771 <xsl:call-template name="outputsysdnet">
772 <xsl:with-param name="netstring"
773 select="substring-before($netstring,'24')"/>
774 </xsl:call-template>
775 <xsl:value-of select="$prefix"/>
776 <xsl:call-template name="outputsysdnet">
777 <xsl:with-param name="netstring"
778 select="substring-after($netstring,'24')"/>
779 </xsl:call-template>
780 </xsl:when>
781 <xsl:when test="contains($netstring,'&lt;Your Domain Name&gt;')">
782 <xsl:call-template name="outputsysdnet">
783 <xsl:with-param name="netstring"
784 select="substring-before($netstring,'&lt;Your Domain Name&gt;')"/>
785 </xsl:call-template>
786 <xsl:value-of select="$domain"/>
787 <xsl:call-template name="outputsysdnet">
788 <xsl:with-param name="netstring"
789 select="substring-after($netstring,'&lt;Your Domain Name&gt;')"/>
790 </xsl:call-template>
791 </xsl:when>
792 <xsl:otherwise>
793 <xsl:value-of select="$netstring"/>
794 </xsl:otherwise>
795 </xsl:choose>
796 </xsl:template>
797
798 <xsl:template name="outputsysvconsole">
799 <!-- We suppose that book example has the following values:
800 - KEYMAP: bg_bds-utf8
801 - FONT: LatArCyrHeb-16
802 Change below if book changes -->
803 <xsl:param name="consolestring" select="''"/>
804 <xsl:choose>
805 <xsl:when test="contains($consolestring,'bg_bds-utf8')">
806 <xsl:call-template name="outputsysvconsole">
807 <xsl:with-param
808 name="consolestring"
809 select="substring-before($consolestring,'bg_bds-utf8')"/>
810 </xsl:call-template>
811 <xsl:value-of select="$keymap"/>
812 <xsl:call-template name="outputsysvconsole">
813 <xsl:with-param
814 name="consolestring"
815 select="substring-after($consolestring,'bg_bds-utf8')"/>
816 </xsl:call-template>
817 </xsl:when>
818 <xsl:when test="contains($consolestring,'LatArCyrHeb-16')">
819 <xsl:call-template name="outputsysvconsole">
820 <xsl:with-param
821 name="consolestring"
822 select="substring-before($consolestring,'LatArCyrHeb-16')"/>
823 </xsl:call-template>
824 <xsl:value-of select="$font"/>
825 <xsl:text>"
826LOGLEVEL="</xsl:text>
827 <xsl:copy-of select="$log-level"/>
828 <xsl:call-template name="outputsysvconsole">
829 <xsl:with-param
830 name="consolestring"
831 select="substring-after($consolestring,'LatArCyrHeb-16')"/>
832 </xsl:call-template>
833 </xsl:when>
834 <xsl:otherwise>
835 <xsl:copy-of select="$consolestring"/>
836 </xsl:otherwise>
837 </xsl:choose>
838 </xsl:template>
839
840 <xsl:template name="outputsysdconsole">
841 <!-- We suppose that book example has the following values:
842 - KEYMAP: de-latin1
843 - FONT: Lat2-Terminus16
844 Change below if book changes -->
845 <xsl:param name="consolestring" select="''"/>
846 <xsl:choose>
847 <xsl:when test="contains($consolestring,'de-latin1')">
848 <xsl:call-template name="outputsysdconsole">
849 <xsl:with-param
850 name="consolestring"
851 select="substring-before($consolestring,'de-latin1')"/>
852 </xsl:call-template>
853 <xsl:value-of select="$keymap"/>
854 <xsl:call-template name="outputsysdconsole">
855 <xsl:with-param
856 name="consolestring"
857 select="substring-after($consolestring,'de-latin1')"/>
858 </xsl:call-template>
859 </xsl:when>
860 <xsl:when test="contains($consolestring,'Lat2-Terminus16')">
861 <xsl:call-template name="outputsysdconsole">
862 <xsl:with-param
863 name="consolestring"
864 select="substring-before($consolestring,'Lat2-Terminus16')"/>
865 </xsl:call-template>
866 <xsl:value-of select="$font"/>
867 <xsl:call-template name="outputsysdconsole">
868 <xsl:with-param
869 name="consolestring"
870 select="substring-after($consolestring,'Lat2-Terminus16')"/>
871 </xsl:call-template>
872 </xsl:when>
873 <xsl:otherwise>
874 <xsl:copy-of select="$consolestring"/>
875 </xsl:otherwise>
876 </xsl:choose>
877 </xsl:template>
878
879 <xsl:template name="outputpkgdest">
880 <xsl:param name="outputstring" select="foo"/>
881 <xsl:choose>
882 <xsl:when test="contains($outputstring,'make ')">
883 <xsl:choose>
884 <xsl:when test="not(starts-with($outputstring,'make'))">
885 <xsl:call-template name="outputpkgdest">
886 <xsl:with-param name="outputstring"
887 select="substring-before($outputstring,'make')"/>
888 </xsl:call-template>
889 <xsl:call-template name="outputpkgdest">
890 <xsl:with-param
891 name="outputstring"
892 select="substring-after($outputstring,
893 substring-before($outputstring,'make'))"/>
894 </xsl:call-template>
895 </xsl:when>
896 <xsl:otherwise>
897 <xsl:choose>
898<!-- special cases (no DESTDIR) here -->
899 <xsl:when test="ancestor::sect1[@id='ch-system-glibc']">
900 <xsl:text>make install_root=$PKG_DEST -j1</xsl:text>
901 <xsl:value-of
902 select="substring-before(substring-after(string(),'make'),
903 'install')"/>
904 <xsl:text>install&#xA;</xsl:text>
905 </xsl:when>
906 <xsl:when test="ancestor::sect1[@id='ch-system-bzip2']">
907 <xsl:text>make PREFIX=$PKG_DEST/usr install&#xA;</xsl:text>
908 </xsl:when>
909 <xsl:when test="ancestor::sect1[@id='ch-system-sysklogd']">
910 <xsl:text>make BINDIR=$PKG_DEST/sbin prefix=$PKG_DEST install&#xA;</xsl:text>
911 </xsl:when>
912 <xsl:when test="ancestor::sect1[@id='ch-system-iproute2']">
913 <xsl:text>make DESTDIR=$PKG_DEST DOCDIR=</xsl:text>
914 <xsl:value-of
915 select="substring-before(substring-after(string(),'DOCDIR='),
916 'install')"/>
917 <xsl:text>install&#xA;</xsl:text>
918 </xsl:when>
919 <xsl:when test="ancestor::sect1[@id='ch-system-sysvinit']">
920 <xsl:text>make ROOT=$PKG_DEST</xsl:text>
921 <xsl:value-of
922 select="substring-before(substring-after(string(),'make'),
923 'install')"/>
924 <xsl:text>install&#xA;</xsl:text>
925 </xsl:when>
926 <xsl:when test="ancestor::sect1[@id='ch-bootable-kernel']">
927 <xsl:text>make INSTALL_MOD_PATH=$PKG_DEST</xsl:text>
928 <xsl:value-of
929 select="substring-before(substring-after(string(),'make'),
930 'install')"/>
931 <xsl:text>install&#xA;</xsl:text>
932 </xsl:when>
933 <xsl:otherwise>
934 <xsl:text>make DESTDIR=$PKG_DEST</xsl:text>
935 <xsl:call-template name="outputpkgdest">
936 <xsl:with-param
937 name="outputstring"
938 select="substring-after($outputstring,'make')"/>
939 </xsl:call-template>
940 </xsl:otherwise>
941 </xsl:choose>
942 </xsl:otherwise>
943 </xsl:choose>
944 </xsl:when>
945 <xsl:when test="contains($outputstring,'ninja install')">
946 <xsl:choose>
947 <xsl:when test="not(starts-with($outputstring,'ninja install'))">
948 <xsl:call-template name="outputpkgdest">
949 <xsl:with-param name="outputstring"
950 select="substring-before($outputstring,'ninja install')"/>
951 </xsl:call-template>
952 <xsl:call-template name="outputpkgdest">
953 <xsl:with-param
954 name="outputstring"
955 select="substring-after($outputstring,
956 substring-before($outputstring,'ninja install'))"/>
957 </xsl:call-template>
958 </xsl:when>
959 <xsl:otherwise> <!-- "ninja" is the first word and is followed by
960 "install"-->
961 <xsl:text>DESTDIR=$PKG_DEST ninja</xsl:text>
962 <xsl:call-template name="outputpkgdest">
963 <xsl:with-param
964 name="outputstring"
965 select="substring-after($outputstring,'ninja')"/>
966 </xsl:call-template>
967 </xsl:otherwise>
968 </xsl:choose>
969 </xsl:when>
970 <xsl:otherwise> <!-- no make nor ninja in this string -->
971 <xsl:choose>
972 <xsl:when test="contains($outputstring,'&gt;/') and
973 not(contains(substring-before($outputstring,'&gt;/'),' /'))">
974 <xsl:value-of select="substring-before($outputstring,'&gt;/')"/>
975 <xsl:text>&gt;$PKG_DEST/</xsl:text>
976 <xsl:call-template name="outputpkgdest">
977 <xsl:with-param name="outputstring" select="substring-after($outputstring,'&gt;/')"/>
978 </xsl:call-template>
979 </xsl:when>
980 <xsl:when test="contains($outputstring,' /')">
981 <xsl:value-of select="substring-before($outputstring,' /')"/>
982 <xsl:text> $PKG_DEST/</xsl:text>
983 <xsl:call-template name="outputpkgdest">
984 <xsl:with-param name="outputstring" select="substring-after($outputstring,' /')"/>
985 </xsl:call-template>
986 </xsl:when>
987 <xsl:otherwise>
988 <xsl:value-of select="$outputstring"/>
989 </xsl:otherwise>
990 </xsl:choose>
991 </xsl:otherwise>
992 </xsl:choose>
993 </xsl:template>
994
995 <xsl:variable name="APOS">'</xsl:variable>
996 <xsl:template name="output-wrap">
997 <xsl:param name="commands" select="''"/>
998 <xsl:choose>
999 <xsl:when test="contains($commands,string($APOS))">
1000 <xsl:call-template name="output-wrap">
1001 <xsl:with-param name="commands"
1002 select="substring-before($commands,string($APOS))"/>
1003 </xsl:call-template>
1004 <xsl:text>'\''</xsl:text>
1005 <xsl:call-template name="output-wrap">
1006 <xsl:with-param name="commands"
1007 select="substring-after($commands,string($APOS))"/>
1008 </xsl:call-template>
1009 </xsl:when>
1010 <xsl:otherwise>
1011 <xsl:value-of select="$commands"/>
1012 </xsl:otherwise>
1013 </xsl:choose>
1014 </xsl:template>
1015
1016 <xsl:template name="comment-strip">
1017 <xsl:param name="instructions" select="''"/>
1018 <xsl:choose>
1019 <xsl:when test="contains($instructions,'&#xA;')">
1020 <xsl:call-template name="comment-strip">
1021 <xsl:with-param name="instructions"
1022 select="substring-before($instructions,'&#xA;')"/>
1023 </xsl:call-template>
1024 <xsl:call-template name="comment-strip">
1025 <xsl:with-param name="instructions"
1026 select="substring-after($instructions,'&#xA;')"/>
1027 </xsl:call-template>
1028 </xsl:when>
1029 <xsl:when test="contains($instructions,'\*.la')">
1030 <xsl:if test="$del-la-files='n'">
1031 <xsl:text># </xsl:text>
1032 </xsl:if>
1033 <xsl:value-of select="$instructions"/>
1034 <xsl:text>&#xA;</xsl:text>
1035 </xsl:when>
1036 <xsl:when test="contains($instructions,'strip ')">
1037 <xsl:if test="$strip='n'">
1038 <xsl:text># </xsl:text>
1039 </xsl:if>
1040 <xsl:value-of select="$instructions"/>
1041 <xsl:text> || true&#xA;</xsl:text>
1042 </xsl:when>
1043 <xsl:otherwise>
1044 <xsl:value-of select="$instructions"/>
1045 <xsl:text>&#xA;</xsl:text>
1046 </xsl:otherwise>
1047 </xsl:choose>
1048 </xsl:template>
1049
1050 <xsl:template name="comment-test">
1051 <xsl:param name="instructions" select="''"/>
1052 <xsl:choose>
1053 <xsl:when test="contains($instructions,'&#xA;')">
1054 <xsl:call-template name="comment-test">
1055 <xsl:with-param name="instructions"
1056 select="substring-before($instructions,'&#xA;')"/>
1057 </xsl:call-template>
1058 <xsl:call-template name="comment-test">
1059 <xsl:with-param name="instructions"
1060 select="substring-after($instructions,'&#xA;')"/>
1061 </xsl:call-template>
1062 </xsl:when>
1063 <xsl:otherwise>
1064 <xsl:if test="$testsuite = '0' or
1065 $testsuite = '1' and
1066 not(ancestor::sect1[@id='ch-system-gcc']) and
1067 not(ancestor::sect1[@id='ch-system-glibc']) and
1068 not(ancestor::sect1[@id='ch-system-gmp']) and
1069 not(ancestor::sect1[@id='ch-system-mpfr']) and
1070 not(ancestor::sect1[@id='ch-system-binutils']) or
1071 $testsuite = '2' and
1072 ancestor::chapter[@id='chapter-temporary-tools']">
1073 <xsl:text># </xsl:text>
1074 </xsl:if>
1075 <xsl:choose>
1076 <xsl:when test="$bomb-testsuite = 'n'">
1077 <xsl:choose>
1078 <xsl:when test="contains(string(), 'make -k')">
1079 <xsl:value-of select="$instructions"/>
1080 <xsl:text> &gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
1081 </xsl:when>
1082 <xsl:when test="contains($instructions, 'make')">
1083 <xsl:value-of select="substring-before($instructions, 'make')"/>
1084 <xsl:text>make -k</xsl:text>
1085 <xsl:value-of select="substring-after($instructions, 'make')"/>
1086 <xsl:text> &gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
1087 </xsl:when>
1088 <xsl:otherwise>
1089 <xsl:value-of select="$instructions"/>
1090 <xsl:if
1091 test="not(contains($instructions, '&gt;&gt;')) and
1092 substring($instructions,
1093 string-length($instructions)) != '\'">
1094 <xsl:text> &gt;&gt; $TEST_LOG 2&gt;&amp;1</xsl:text>
1095 </xsl:if>
1096 <xsl:text>&#xA;</xsl:text>
1097 </xsl:otherwise>
1098 </xsl:choose>
1099 </xsl:when>
1100 <xsl:otherwise>
1101 <!-- bomb-testsuite != 'n'-->
1102 <xsl:choose>
1103 <xsl:when test="contains($instructions, 'make -k')">
1104 <xsl:value-of select="$instructions"/>
1105 <xsl:text> &gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
1106 </xsl:when>
1107 <xsl:otherwise>
1108 <xsl:value-of select="$instructions"/>
1109 <xsl:if test="not(contains($instructions, '&gt;&gt;')) and
1110 substring($instructions,
1111 string-length($instructions)) != '\'">
1112 <xsl:text> &gt;&gt; $TEST_LOG 2&gt;&amp;1</xsl:text>
1113 </xsl:if>
1114 <xsl:text>&#xA;</xsl:text>
1115 </xsl:otherwise>
1116 </xsl:choose>
1117 </xsl:otherwise> <!-- end not bomb-test=n -->
1118 </xsl:choose>
1119 </xsl:otherwise>
1120 </xsl:choose>
1121 </xsl:template>
1122
1123</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.