source: LFS/lfs.xsl@ 05f3977

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

I cannot read: variable in /etc/sysconfig/console is LOGLEVEL, not LOG_LEVEL!

  • Property mode set to 100644
File size: 46.0 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 <xsl:text>mkdir -pv $PKG_DEST/{boot,etc,lib,bin,sbin}
225mkdir -pv $PKG_DEST/usr/{lib,bin,sbin,include}
226mkdir -pv $PKG_DEST/usr/share/{doc,info,man}
227mkdir -pv $PKG_DEST/usr/share/man/man{1..8}
228ln -sv share/{man,doc,info} $PKG_DEST/usr
229case $(uname -m) in
230 x86_64) ln -sv lib $PKG_DEST/lib64 &amp;&amp; ln -sv lib $PKG_DEST/usr/lib64 ;;
231esac
232</xsl:text>
233 </xsl:otherwise>
234 </xsl:choose>
235 </xsl:if>
236 <xsl:if test="../@id = 'ch-system-glibc' and
237 @role='installation' and
238 $pkgmngt = 'y' and
239 $wrap-install = 'n'">
240 <xsl:text>mkdir -pv $PKG_DEST/usr/include/{rpc,rpcsvc}
241</xsl:text>
242 </xsl:if>
243 <xsl:if test="../@id = 'ch-system-libelf' and
244 @role='installation' and
245 $pkgmngt = 'y' and
246 $wrap-install = 'n'">
247 <xsl:text>mkdir -pv $PKG_DEST/usr/lib/pkgconfig
248</xsl:text>
249 </xsl:if>
250 <xsl:apply-templates
251 select=".//screen[(not(@role) or
252 @role != 'nodump') and
253 (not(@revision) or
254 @revision=$revision)]/userinput[@remap = 'install']"/>
255 <xsl:if test="ancestor::chapter[@id != 'chapter-temporary-tools'] and
256 descendant::screen[not(@role) or
257 @role != 'nodump']/userinput[
258 @remap='install']">
259 <xsl:choose>
260 <xsl:when test="$pkgmngt='n'"/>
261 <xsl:when test="$wrap-install='y'">
262 <xsl:if test="../@id = 'ch-system-man-pages'">
263<!-- these files are provided by the shadow package -->
264 <xsl:text>rm -fv /usr/share/man/{man3/getspnam.3,man5/passwd.5}
265</xsl:text>
266 </xsl:if>
267<!-- Attr man/man2 pages are already installed by man-pages. As of
268 March 2013, they are the same pages.
269 November 2015: now they are more accurate
270 in man-pages, and the man5 section is also in man-pages... -->
271 <xsl:if test="../@id = 'ch-system-attr'">
272 <xsl:text>rm -fv /usr/share/man/man2/*
273rm -fv /usr/share/man/man5/*
274</xsl:text>
275 </xsl:if>
276<!-- nologin is installed by util-linux. remove it from shadow -->
277 <xsl:if test="../@id = 'ch-system-shadow'">
278 <xsl:text>rm -fv /usr/share/man/man8/nologin.8
279rm -fv /sbin/nologin
280</xsl:text>
281 </xsl:if>
282 <xsl:text>'
283PREV_SEC=${SECONDS}
284packInstall
285SECONDS=${PREV_SEC}
286</xsl:text>
287 </xsl:when>
288 <xsl:otherwise>
289 <xsl:if test="../@id = 'ch-system-man-pages'">
290<!-- these files are provided by the shadow package -->
291 <xsl:text>rm -fv $PKG_DEST/usr/share/man/{man3/getspnam.3,man5/passwd.5}
292</xsl:text>
293 </xsl:if>
294<!-- Attr man/man2 pages are already installed by man-pages. As of
295 March 2013, they are the same pages.
296 November 2015: now they are more accurate
297 in man-pages, and the man5 section is also in man-pages... -->
298 <xsl:if test="../@id = 'ch-system-attr'">
299 <xsl:text>rm -fv $PKG_DEST/usr/share/man/man2/*
300rm -fv $PKG_DEST/usr/share/man/man5/*
301</xsl:text>
302 </xsl:if>
303<!-- nologin is installed by util-linux. remove it from shadow -->
304 <xsl:if test="../@id = 'ch-system-shadow'">
305 <xsl:text>rm -fv $PKG_DEST/usr/share/man/man8/nologin.8
306rm -fv $PKG_DEST/sbin/nologin
307</xsl:text>
308 </xsl:if>
309 <xsl:text>rm -fv $PKG_DEST/{,usr/}lib64
310rm -fv $PKG_DEST/usr/{man,doc,info}
311for dir in $PKG_DEST/usr/share/man/man{1..8}; do
312 [[ -z $(ls $dir) ]] &amp;&amp; rmdir -v $dir
313done
314for dir in $PKG_DEST/usr/share/{doc,info,man}; do
315 [[ -z $(ls $dir) ]] &amp;&amp; rmdir -v $dir
316done
317for dir in $PKG_DEST/usr/{lib,bin,sbin,include}; do
318 [[ -z $(ls $dir) ]] &amp;&amp; rmdir -v $dir
319done
320for dir in $PKG_DEST/{boot,etc,lib,bin,sbin}; do
321 [[ -z $(ls $dir) ]] &amp;&amp; rmdir -v $dir
322done
323PREV_SEC=${SECONDS}
324packInstall
325SECONDS=${PREV_SEC}
326rm -rf $PKG_DEST
327</xsl:text>
328 </xsl:otherwise>
329 </xsl:choose>
330 </xsl:if>
331 <xsl:if test="$testsuite='3' and
332 ../@id='ch-tools-glibc' and
333 @role='installation'">
334 <xsl:copy-of select="//userinput[@remap='locale-test']"/>
335 <xsl:text>&#xA;</xsl:text>
336 </xsl:if>
337 <xsl:if test="../@id='ch-system-glibc' and @role='installation'">
338 <xsl:choose>
339 <xsl:when test="$full-locale='y'">
340 <xsl:copy-of select="//userinput[@remap='locale-full']"/>
341 <xsl:text>&#xA;</xsl:text>
342 </xsl:when>
343 <xsl:otherwise>
344 <xsl:copy-of select="//userinput[@remap='locale-test']"/>
345 <xsl:text>&#xA;</xsl:text>
346 <xsl:if test="not(contains(string(//userinput[@remap='locale-test']),$lang)) and $lang!='C' and $lang!='POSIX'">
347 <xsl:text>if LOCALE=`grep "</xsl:text>
348 <xsl:value-of select="$lang"/>
349 <xsl:text>/" $PKGDIR/localedata/SUPPORTED`; then
350 CHARMAP=`echo $LOCALE | sed 's,[^/]*/\([^ ]*\) [\],\1,'`
351 INPUT=`echo $LOCALE | sed 's,[/.].*,,'`
352 LOCALE=`echo $LOCALE | sed 's,/.*,,'`
353 localedef -i $INPUT -f $CHARMAP $LOCALE
354fi
355</xsl:text>
356 </xsl:if>
357 </xsl:otherwise>
358 </xsl:choose>
359 </xsl:if>
360 <xsl:apply-templates
361 select=".//screen[
362 (not(@role) or
363 @role != 'nodump') and
364 (not(@revision) or
365 @revision=$revision)
366 ]/userinput[
367 not(@remap) or
368 @remap='adjust' or
369 @remap='test' and current()/../@id='ch-tools-dejagnu' or
370 @remap='test' and current()/../@id='ch-system-systemd'
371 ]"/>
372 </xsl:template>
373
374 <xsl:template match="sect1" mode="pkgmngt">
375 <xsl:param name="dirname" select="chapter05"/>
376 <!-- The build order -->
377 <xsl:param name="order" select="062"/>
378<!-- The file names -->
379 <xsl:variable name="pi-file" select="processing-instruction('dbhtml')"/>
380 <xsl:variable name="pi-file-value" select="substring-after($pi-file,'filename=')"/>
381 <xsl:variable name="filename" select="substring-before(substring($pi-file-value,2),'.html')"/>
382 <!-- Creating dirs and files -->
383 <xsl:if test="count(descendant::screen/userinput) &gt; 0 and
384 count(descendant::screen/userinput) &gt;
385 count(descendant::screen[@role='nodump'])">
386 <exsl:document href="{$dirname}/{$order}-{position()}-{$filename}"
387 method="text">
388 <xsl:text>#!/bin/bash
389set +h
390set -e
391
392cd $PKGDIR
393</xsl:text>
394 <xsl:apply-templates
395 select=".//screen[not(@role) or
396 @role != 'nodump']/userinput[@remap != 'adjust']"
397 mode="pkgmngt"/>
398 <xsl:if test="$dirname = 'chapter06'">
399 <xsl:text>PREV_SEC=${SECONDS}
400packInstall
401SECONDS=${PREV_SEC}
402rm -rf "$PKG_DEST"
403</xsl:text>
404 </xsl:if>
405 <xsl:apply-templates
406 select=".//screen[not(@role) or
407 @role != 'nodump'
408 ]/userinput[not(@remap) or
409 @remap='adjust'
410 ]"
411 mode="pkgmngt"/>
412 <xsl:text>
413echo -e "\n\nTotalseconds: $SECONDS\n"
414exit
415</xsl:text>
416 </exsl:document>
417 </xsl:if>
418 </xsl:template>
419
420 <xsl:template match="userinput" mode="pkgmngt">
421 <xsl:apply-templates/>
422 <xsl:text>&#xA;</xsl:text>
423 </xsl:template>
424
425 <xsl:template match="userinput">
426 <xsl:choose>
427 <!-- Copying the kernel config file -->
428 <xsl:when test="string() = 'make mrproper'">
429 <xsl:text>make mrproper&#xA;</xsl:text>
430 <xsl:if test="ancestor::sect1[@id='ch-bootable-kernel']">
431 <xsl:text>cp -v ../kernel-config .config&#xA;</xsl:text>
432 </xsl:if>
433 </xsl:when>
434<!-- test instructions -->
435 <xsl:when test="@remap = 'test'">
436 <xsl:call-template name="comment-test">
437 <xsl:with-param name="instructions" select="string()"/>
438 </xsl:call-template>
439 </xsl:when>
440<!-- End of test instructions -->
441<!-- If the instructions contain "strip ", it may mean they contain also .la
442 file removal (and possibly other clean up). We therefore call a template
443 to comment them out appropriately and also to not stop if stripping
444 fails. -->
445 <xsl:when test="contains(string(),'strip ') or
446 contains(string(),'\*.la')">
447 <xsl:call-template name="comment-strip">
448 <xsl:with-param name="instructions" select="string()"/>
449 </xsl:call-template>
450 </xsl:when>
451<!-- Package management -->
452<!-- Add $PKG_DEST to installation commands -->
453 <xsl:when test="@remap='install' and
454 not(ancestor::chapter[
455 @id='chapter-temporary-tools'
456 ])">
457 <xsl:choose>
458 <xsl:when test="$pkgmngt='n'">
459 <xsl:choose>
460 <xsl:when test="contains(string(),'firmware,udev')">
461 <xsl:text>if [[ ! -d /lib/udev/devices ]] ; then&#xA;</xsl:text>
462 <xsl:apply-templates/>
463 <xsl:text>&#xA;fi&#xA;</xsl:text>
464 </xsl:when>
465 <xsl:otherwise>
466 <xsl:apply-templates/>
467 <xsl:text>&#xA;</xsl:text>
468 </xsl:otherwise>
469 </xsl:choose>
470 </xsl:when>
471 <xsl:when test="$wrap-install='y'">
472 <xsl:choose>
473 <xsl:when test="./literal">
474 <xsl:call-template name="output-wrap">
475 <xsl:with-param name="commands" select="text()[1]"/>
476 </xsl:call-template>
477 <xsl:apply-templates select="literal"/>
478 <xsl:call-template name="output-wrap">
479 <xsl:with-param name="commands" select="text()[2]"/>
480 </xsl:call-template>
481 </xsl:when>
482 <xsl:otherwise>
483 <xsl:call-template name="output-wrap">
484 <xsl:with-param name="commands" select="string()"/>
485 </xsl:call-template>
486 </xsl:otherwise>
487 </xsl:choose>
488 <xsl:text>&#xA;</xsl:text>
489 </xsl:when>
490 <xsl:otherwise><!--pkgmngt = 'y' and wrap-install='n'-->
491 <xsl:choose>
492 <xsl:when test="./literal">
493 <xsl:call-template name="outputpkgdest">
494 <xsl:with-param name="outputstring" select="text()[1]"/>
495 </xsl:call-template>
496 <xsl:apply-templates select="literal"/>
497 <xsl:call-template name="outputpkgdest">
498 <xsl:with-param name="outputstring" select="text()[2]"/>
499 </xsl:call-template>
500 </xsl:when>
501 <xsl:otherwise>
502 <xsl:call-template name="outputpkgdest">
503 <xsl:with-param name="outputstring" select="string()"/>
504 </xsl:call-template>
505 </xsl:otherwise>
506 </xsl:choose>
507 <xsl:text>&#xA;</xsl:text>
508 </xsl:otherwise>
509 </xsl:choose>
510 </xsl:when> <!-- @remap='install' -->
511 <!-- if package management, we should make an independant package for
512 tzdata. -->
513 <xsl:when test="contains(string(),'tzdata') and $pkgmngt='y'">
514 <xsl:text>
515OLD_PKG_DEST="$PKG_DEST"
516OLD_PKGDIR=$PKGDIR
517PKG_DEST=$(dirname $OLD_PKG_DEST)/001-tzdata
518PKGDIR=$(dirname $PKGDIR)/tzdata-</xsl:text>
519 <xsl:copy-of select="substring-before(
520 substring-after(string(),'tzdata'),
521 '.tar')"/>
522 <xsl:text>
523</xsl:text>
524 <xsl:choose>
525 <xsl:when test="$wrap-install='n'">
526 <xsl:copy-of select="substring-before(string(),'ZONEINFO=')"/>
527 <xsl:text>ZONEINFO=$PKG_DEST</xsl:text>
528 <xsl:copy-of select="substring-after(string(),'ZONEINFO=')"/>
529 <xsl:text>
530PREV_SEC=${SECONDS}
531packInstall
532SECONDS=${PREV_SEC}
533rm -rf $PKG_DEST
534</xsl:text>
535 </xsl:when>
536 <xsl:otherwise><!-- wrap-install='y' -->
537 <xsl:copy-of select="substring-before(string(),'ZONEINFO=')"/>
538 <xsl:text>
539wrapInstall '
540ZONEINFO=</xsl:text>
541 <xsl:copy-of select="substring-after(string(),'ZONEINFO=')"/>
542 <xsl:text>'
543PREV_SEC=${SECONDS}
544packInstall
545SECONDS=${PREV_SEC}
546</xsl:text>
547 </xsl:otherwise>
548 </xsl:choose>
549 <xsl:text>
550PKG_DEST=$OLD_PKG_DEST
551unset OLD_PKG_DEST
552PKGDIR=$OLD_PKGDIR
553unset OLD_PKGDIR
554</xsl:text>
555 </xsl:when><!-- addition for tzdata + package management -->
556 <!-- End addition for package management -->
557 <!-- The rest of commands -->
558 <xsl:otherwise>
559 <xsl:apply-templates/>
560 <xsl:text>&#xA;</xsl:text>
561 </xsl:otherwise>
562 </xsl:choose>
563 </xsl:template>
564
565 <xsl:template match="replaceable">
566 <xsl:choose>
567 <xsl:when test="ancestor::sect1[@id='ch-system-glibc']">
568 <xsl:value-of select="$timezone"/>
569 </xsl:when>
570 <xsl:when test="ancestor::sect1[@id='ch-system-groff']">
571 <xsl:value-of select="$page"/>
572 </xsl:when>
573 <xsl:when test="contains(string(.),'&lt;ll&gt;_&lt;CC&gt;')">
574 <xsl:value-of select="$lang"/>
575 </xsl:when>
576 <xsl:when test="contains(string(.),'Domain')">
577 <xsl:value-of select="$domain"/>
578 </xsl:when>
579 <xsl:when test="contains(string(.),'primary')">
580 <xsl:value-of select="$nameserver1"/>
581 </xsl:when>
582 <xsl:when test="contains(string(.),'secondary')">
583 <xsl:value-of select="$nameserver2"/>
584 </xsl:when>
585 <xsl:when test="contains(string(.),'192.168.1.1')">
586 <xsl:value-of select="$ip"/>
587 </xsl:when>
588 <xsl:when test="contains(string(.),'192.168.0.2')">
589 <xsl:value-of select="$ip"/>
590 </xsl:when>
591 <xsl:when test="contains(string(.),'eth0')">
592 <xsl:value-of select="$interface"/>
593 </xsl:when>
594<!-- Only adapted to LFS-20170310 and later -->
595 <xsl:when test="contains(string(.),'HOSTNAME')">
596 <xsl:value-of select="$hostname"/>
597 </xsl:when>
598 <xsl:when test="contains(string(.),'FQDN')">
599 <xsl:value-of select="$hostname"/>
600 <xsl:text>.</xsl:text>
601 <xsl:value-of select="$domain"/>
602 </xsl:when>
603 <xsl:when test="contains(string(.),'alias')"/>
604 <xsl:when test="contains(string(.),'&lt;lfs&gt;')">
605 <xsl:value-of select="$hostname"/>
606 </xsl:when>
607 <xsl:otherwise>
608 <xsl:text>**EDITME</xsl:text>
609 <xsl:apply-templates/>
610 <xsl:text>EDITME**</xsl:text>
611 </xsl:otherwise>
612 </xsl:choose>
613 </xsl:template>
614
615 <xsl:template match="literal">
616 <xsl:choose>
617 <xsl:when test="contains(string(),'ONBOOT')">
618 <xsl:call-template name="outputnet">
619 <xsl:with-param name="netstring" select="string()"/>
620 </xsl:call-template>
621 </xsl:when>
622 <xsl:when test="contains(string(),'[Match]')">
623 <xsl:call-template name="outputsysdnet">
624 <xsl:with-param name="netstring" select="string()"/>
625 </xsl:call-template>
626 </xsl:when>
627 <xsl:when test="contains(string(),'0.0 0 0.0')">
628 <xsl:copy-of select="substring-before(string(),'LOCAL')"/>
629 <xsl:if test="$local='y'"><xsl:text>LOCAL</xsl:text></xsl:if>
630 <xsl:if test="$local='n'"><xsl:text>UTC</xsl:text></xsl:if>
631 </xsl:when>
632 <xsl:when test="contains(string(),'UTC=1')">
633 <xsl:copy-of select="substring-before(string(),'1')"/>
634 <xsl:if test="$local='y'"><xsl:text>0</xsl:text></xsl:if>
635 <xsl:if test="$local='n'"><xsl:text>1</xsl:text></xsl:if>
636 <xsl:copy-of select="substring-after(string(),'1')"/>
637 </xsl:when>
638 <xsl:when test="contains(string(),'bg_bds-')">
639 <xsl:call-template name="outputsysvconsole">
640 <xsl:with-param name="consolestring" select="string()"/>
641 </xsl:call-template>
642 </xsl:when>
643 <xsl:when test="contains(string(),'de-latin1')">
644 <xsl:call-template name="outputsysdconsole">
645 <xsl:with-param name="consolestring" select="string()"/>
646 </xsl:call-template>
647 </xsl:when>
648 <xsl:otherwise>
649 <xsl:apply-templates/>
650 </xsl:otherwise>
651 </xsl:choose>
652 </xsl:template>
653
654 <xsl:template name="outputnet">
655 <xsl:param name="netstring" select="''"/>
656 <!-- We suppose that book example has the following values:
657 - interface: eth0
658 - ip: 192.168.1.2
659 - gateway: 192.168.1.1
660 - prefix: 24
661 - broadcast: 192.168.1.255
662 Change below if book changes -->
663 <xsl:choose>
664 <xsl:when test="contains($netstring,'eth0')">
665 <xsl:call-template name="outputnet">
666 <xsl:with-param name="netstring"
667 select="substring-before($netstring,'eth0')"/>
668 </xsl:call-template>
669 <xsl:value-of select="$interface"/>
670 <xsl:call-template name="outputnet">
671 <xsl:with-param name="netstring"
672 select="substring-after($netstring,'eth0')"/>
673 </xsl:call-template>
674 </xsl:when>
675 <xsl:when test="contains($netstring,'192.168.1.1')">
676 <xsl:call-template name="outputnet">
677 <xsl:with-param name="netstring"
678 select="substring-before($netstring,'192.168.1.1')"/>
679 </xsl:call-template>
680 <xsl:value-of select="$gateway"/>
681 <xsl:call-template name="outputnet">
682 <xsl:with-param name="netstring"
683 select="substring-after($netstring,'192.168.1.1')"/>
684 </xsl:call-template>
685 </xsl:when>
686 <!-- must test this before the following, because 192.168.1.255 contains
687 192.168.1.2! -->
688 <xsl:when test="contains($netstring,'192.168.1.255')">
689 <xsl:call-template name="outputnet">
690 <xsl:with-param name="netstring"
691 select="substring-before($netstring,'192.168.1.255')"/>
692 </xsl:call-template>
693 <xsl:value-of select="$broadcast"/>
694 <xsl:call-template name="outputnet">
695 <xsl:with-param name="netstring"
696 select="substring-after($netstring,'192.168.1.255')"/>
697 </xsl:call-template>
698 </xsl:when>
699 <xsl:when test="contains($netstring,'192.168.1.2')">
700 <xsl:call-template name="outputnet">
701 <xsl:with-param name="netstring"
702 select="substring-before($netstring,'192.168.1.2')"/>
703 </xsl:call-template>
704 <xsl:value-of select="$ip"/>
705 <xsl:call-template name="outputnet">
706 <xsl:with-param name="netstring"
707 select="substring-after($netstring,'192.168.1.2')"/>
708 </xsl:call-template>
709 </xsl:when>
710 <xsl:when test="contains($netstring,'24')">
711 <xsl:call-template name="outputnet">
712 <xsl:with-param name="netstring"
713 select="substring-before($netstring,'24')"/>
714 </xsl:call-template>
715 <xsl:value-of select="$prefix"/>
716 <xsl:call-template name="outputnet">
717 <xsl:with-param name="netstring"
718 select="substring-after($netstring,'24')"/>
719 </xsl:call-template>
720 </xsl:when>
721 <xsl:otherwise>
722 <xsl:value-of select="$netstring"/>
723 </xsl:otherwise>
724 </xsl:choose>
725 </xsl:template>
726
727 <xsl:template name="outputsysdnet">
728 <xsl:param name="netstring" select="''"/>
729 <!-- We suppose that book example has the following values:
730 - interface: <network-device-name>
731 - ip: 192.168.0.2
732 - gateway: 192.168.0.1
733 - prefix: 24
734 - DNS: 192.168.0.1
735 - Domain: <Your Domain Name>
736 and gateway comes before DNS. Change below if book changes -->
737 <xsl:choose>
738 <xsl:when test="contains($netstring,'&lt;network-device-name&gt;')">
739 <xsl:call-template name="outputsysdnet">
740 <xsl:with-param name="netstring"
741 select="substring-before($netstring,'&lt;network-device-name&gt;')"/>
742 </xsl:call-template>
743 <xsl:value-of select="$interface"/>
744 <xsl:call-template name="outputsysdnet">
745 <xsl:with-param name="netstring"
746 select="substring-after($netstring,'&lt;network-device-name&gt;')"/>
747 </xsl:call-template>
748 </xsl:when>
749 <xsl:when test="contains($netstring,'192.168.0.1') and
750 contains($netstring,'Gateway')">
751 <xsl:call-template name="outputsysdnet">
752 <xsl:with-param name="netstring"
753 select="substring-before($netstring,'192.168.0.1')"/>
754 </xsl:call-template>
755 <xsl:value-of select="$gateway"/>
756 <xsl:call-template name="outputsysdnet">
757 <xsl:with-param name="netstring"
758 select="substring-after($netstring,'192.168.0.1')"/>
759 </xsl:call-template>
760 </xsl:when>
761 <xsl:when test="contains($netstring,'192.168.0.1') and
762 not(contains($netstring,'Gateway'))">
763 <xsl:call-template name="outputsysdnet">
764 <xsl:with-param name="netstring"
765 select="substring-before($netstring,'192.168.0.1')"/>
766 </xsl:call-template>
767 <xsl:value-of select="$nameserver1"/>
768 <xsl:text>
769DNS=</xsl:text>
770 <xsl:value-of select="$nameserver2"/>
771 <xsl:call-template name="outputsysdnet">
772 <xsl:with-param name="netstring"
773 select="substring-after($netstring,'192.168.0.1')"/>
774 </xsl:call-template>
775 </xsl:when>
776 <xsl:when test="contains($netstring,'192.168.0.2')">
777 <xsl:call-template name="outputsysdnet">
778 <xsl:with-param name="netstring"
779 select="substring-before($netstring,'192.168.0.2')"/>
780 </xsl:call-template>
781 <xsl:value-of select="$ip"/>
782 <xsl:call-template name="outputsysdnet">
783 <xsl:with-param name="netstring"
784 select="substring-after($netstring,'192.168.0.2')"/>
785 </xsl:call-template>
786 </xsl:when>
787 <xsl:when test="contains($netstring,'24')">
788 <xsl:call-template name="outputsysdnet">
789 <xsl:with-param name="netstring"
790 select="substring-before($netstring,'24')"/>
791 </xsl:call-template>
792 <xsl:value-of select="$prefix"/>
793 <xsl:call-template name="outputsysdnet">
794 <xsl:with-param name="netstring"
795 select="substring-after($netstring,'24')"/>
796 </xsl:call-template>
797 </xsl:when>
798 <xsl:when test="contains($netstring,'&lt;Your Domain Name&gt;')">
799 <xsl:call-template name="outputsysdnet">
800 <xsl:with-param name="netstring"
801 select="substring-before($netstring,'&lt;Your Domain Name&gt;')"/>
802 </xsl:call-template>
803 <xsl:value-of select="$domain"/>
804 <xsl:call-template name="outputsysdnet">
805 <xsl:with-param name="netstring"
806 select="substring-after($netstring,'&lt;Your Domain Name&gt;')"/>
807 </xsl:call-template>
808 </xsl:when>
809 <xsl:otherwise>
810 <xsl:value-of select="$netstring"/>
811 </xsl:otherwise>
812 </xsl:choose>
813 </xsl:template>
814
815 <xsl:template name="outputsysvconsole">
816 <!-- We suppose that book example has the following values:
817 - KEYMAP: bg_bds-utf8
818 - FONT: LatArCyrHeb-16
819 Change below if book changes -->
820 <xsl:param name="consolestring" select="''"/>
821 <xsl:choose>
822 <xsl:when test="contains($consolestring,'bg_bds-utf8')">
823 <xsl:call-template name="outputsysvconsole">
824 <xsl:with-param
825 name="consolestring"
826 select="substring-before($consolestring,'bg_bds-utf8')"/>
827 </xsl:call-template>
828 <xsl:value-of select="$keymap"/>
829 <xsl:call-template name="outputsysvconsole">
830 <xsl:with-param
831 name="consolestring"
832 select="substring-after($consolestring,'bg_bds-utf8')"/>
833 </xsl:call-template>
834 </xsl:when>
835 <xsl:when test="contains($consolestring,'LatArCyrHeb-16')">
836 <xsl:call-template name="outputsysvconsole">
837 <xsl:with-param
838 name="consolestring"
839 select="substring-before($consolestring,'LatArCyrHeb-16')"/>
840 </xsl:call-template>
841 <xsl:value-of select="$font"/>
842 <xsl:text>"
843LOGLEVEL="</xsl:text>
844 <xsl:copy-of select="$log-level"/>
845 <xsl:call-template name="outputsysvconsole">
846 <xsl:with-param
847 name="consolestring"
848 select="substring-after($consolestring,'LatArCyrHeb-16')"/>
849 </xsl:call-template>
850 </xsl:when>
851 <xsl:otherwise>
852 <xsl:copy-of select="$consolestring"/>
853 </xsl:otherwise>
854 </xsl:choose>
855 </xsl:template>
856
857 <xsl:template name="outputsysdconsole">
858 <!-- We suppose that book example has the following values:
859 - KEYMAP: de-latin1
860 - FONT: Lat2-Terminus16
861 Change below if book changes -->
862 <xsl:param name="consolestring" select="''"/>
863 <xsl:choose>
864 <xsl:when test="contains($consolestring,'de-latin1')">
865 <xsl:call-template name="outputsysdconsole">
866 <xsl:with-param
867 name="consolestring"
868 select="substring-before($consolestring,'de-latin1')"/>
869 </xsl:call-template>
870 <xsl:value-of select="$keymap"/>
871 <xsl:call-template name="outputsysdconsole">
872 <xsl:with-param
873 name="consolestring"
874 select="substring-after($consolestring,'de-latin1')"/>
875 </xsl:call-template>
876 </xsl:when>
877 <xsl:when test="contains($consolestring,'Lat2-Terminus16')">
878 <xsl:call-template name="outputsysdconsole">
879 <xsl:with-param
880 name="consolestring"
881 select="substring-before($consolestring,'Lat2-Terminus16')"/>
882 </xsl:call-template>
883 <xsl:value-of select="$font"/>
884 <xsl:call-template name="outputsysdconsole">
885 <xsl:with-param
886 name="consolestring"
887 select="substring-after($consolestring,'Lat2-Terminus16')"/>
888 </xsl:call-template>
889 </xsl:when>
890 <xsl:otherwise>
891 <xsl:copy-of select="$consolestring"/>
892 </xsl:otherwise>
893 </xsl:choose>
894 </xsl:template>
895
896 <xsl:template name="outputpkgdest">
897 <xsl:param name="outputstring" select="foo"/>
898 <xsl:choose>
899 <xsl:when test="contains($outputstring,'make ')">
900 <xsl:choose>
901 <xsl:when test="not(starts-with($outputstring,'make'))">
902 <xsl:call-template name="outputpkgdest">
903 <xsl:with-param name="outputstring"
904 select="substring-before($outputstring,'make')"/>
905 </xsl:call-template>
906 <xsl:call-template name="outputpkgdest">
907 <xsl:with-param
908 name="outputstring"
909 select="substring-after($outputstring,
910 substring-before($outputstring,'make'))"/>
911 </xsl:call-template>
912 </xsl:when>
913 <xsl:otherwise>
914 <xsl:choose>
915<!-- special cases (no DESTDIR) here -->
916 <xsl:when test="ancestor::sect1[@id='ch-system-glibc']">
917 <xsl:text>make install_root=$PKG_DEST -j1</xsl:text>
918 <xsl:value-of
919 select="substring-before(substring-after(string(),'make'),
920 'install')"/>
921 <xsl:text>install&#xA;</xsl:text>
922 </xsl:when>
923 <xsl:when test="ancestor::sect1[@id='ch-system-bzip2']">
924 <xsl:text>make PREFIX=$PKG_DEST/usr install&#xA;</xsl:text>
925 </xsl:when>
926 <xsl:when test="ancestor::sect1[@id='ch-system-sysklogd']">
927 <xsl:text>make BINDIR=$PKG_DEST/sbin prefix=$PKG_DEST install&#xA;</xsl:text>
928 </xsl:when>
929 <xsl:when test="ancestor::sect1[@id='ch-system-iproute2']">
930 <xsl:text>make DESTDIR=$PKG_DEST DOCDIR=</xsl:text>
931 <xsl:value-of
932 select="substring-before(substring-after(string(),'DOCDIR='),
933 'install')"/>
934 <xsl:text>install&#xA;</xsl:text>
935 </xsl:when>
936 <xsl:when test="ancestor::sect1[@id='ch-system-sysvinit']">
937 <xsl:text>make ROOT=$PKG_DEST</xsl:text>
938 <xsl:value-of
939 select="substring-before(substring-after(string(),'make'),
940 'install')"/>
941 <xsl:text>install&#xA;</xsl:text>
942 </xsl:when>
943 <xsl:when test="ancestor::sect1[@id='ch-bootable-kernel']">
944 <xsl:text>make INSTALL_MOD_PATH=$PKG_DEST</xsl:text>
945 <xsl:value-of
946 select="substring-before(substring-after(string(),'make'),
947 'install')"/>
948 <xsl:text>install&#xA;</xsl:text>
949 </xsl:when>
950 <xsl:when test="ancestor::sect1[@id='ch-system-attr']">
951 <xsl:text>DIST_ROOT=$PKG_DEST make</xsl:text>
952 <xsl:call-template name="outputpkgdest">
953 <xsl:with-param name="outputstring"
954 select="substring-after($outputstring,'make')"/>
955 </xsl:call-template>
956 </xsl:when>
957 <xsl:otherwise>
958 <xsl:text>make DESTDIR=$PKG_DEST</xsl:text>
959 <xsl:call-template name="outputpkgdest">
960 <xsl:with-param
961 name="outputstring"
962 select="substring-after($outputstring,'make')"/>
963 </xsl:call-template>
964 </xsl:otherwise>
965 </xsl:choose>
966 </xsl:otherwise>
967 </xsl:choose>
968 </xsl:when>
969 <xsl:when test="contains($outputstring,'ninja install')">
970 <xsl:choose>
971 <xsl:when test="not(starts-with($outputstring,'ninja install'))">
972 <xsl:call-template name="outputpkgdest">
973 <xsl:with-param name="outputstring"
974 select="substring-before($outputstring,'ninja install')"/>
975 </xsl:call-template>
976 <xsl:call-template name="outputpkgdest">
977 <xsl:with-param
978 name="outputstring"
979 select="substring-after($outputstring,
980 substring-before($outputstring,'ninja install'))"/>
981 </xsl:call-template>
982 </xsl:when>
983 <xsl:otherwise> <!-- "ninja" is the first word and is followed by
984 "install"-->
985 <xsl:text>DESTDIR=$PKG_DEST ninja</xsl:text>
986 <xsl:call-template name="outputpkgdest">
987 <xsl:with-param
988 name="outputstring"
989 select="substring-after($outputstring,'ninja')"/>
990 </xsl:call-template>
991 </xsl:otherwise>
992 </xsl:choose>
993 </xsl:when>
994 <xsl:otherwise> <!-- no make nor ninja in this string -->
995 <xsl:choose>
996 <xsl:when test="contains($outputstring,'&gt;/') and
997 not(contains(substring-before($outputstring,'&gt;/'),' /'))">
998 <xsl:value-of select="substring-before($outputstring,'&gt;/')"/>
999 <xsl:text>&gt;$PKG_DEST/</xsl:text>
1000 <xsl:call-template name="outputpkgdest">
1001 <xsl:with-param name="outputstring" select="substring-after($outputstring,'&gt;/')"/>
1002 </xsl:call-template>
1003 </xsl:when>
1004 <xsl:when test="contains($outputstring,' /')">
1005 <xsl:value-of select="substring-before($outputstring,' /')"/>
1006 <xsl:text> $PKG_DEST/</xsl:text>
1007 <xsl:call-template name="outputpkgdest">
1008 <xsl:with-param name="outputstring" select="substring-after($outputstring,' /')"/>
1009 </xsl:call-template>
1010 </xsl:when>
1011 <xsl:otherwise>
1012 <xsl:value-of select="$outputstring"/>
1013 </xsl:otherwise>
1014 </xsl:choose>
1015 </xsl:otherwise>
1016 </xsl:choose>
1017 </xsl:template>
1018
1019 <xsl:variable name="APOS">'</xsl:variable>
1020 <xsl:template name="output-wrap">
1021 <xsl:param name="commands" select="''"/>
1022 <xsl:choose>
1023 <xsl:when test="contains($commands,string($APOS))">
1024 <xsl:call-template name="output-wrap">
1025 <xsl:with-param name="commands"
1026 select="substring-before($commands,string($APOS))"/>
1027 </xsl:call-template>
1028 <xsl:text>'\''</xsl:text>
1029 <xsl:call-template name="output-wrap">
1030 <xsl:with-param name="commands"
1031 select="substring-after($commands,string($APOS))"/>
1032 </xsl:call-template>
1033 </xsl:when>
1034 <xsl:otherwise>
1035 <xsl:value-of select="$commands"/>
1036 </xsl:otherwise>
1037 </xsl:choose>
1038 </xsl:template>
1039
1040 <xsl:template name="comment-strip">
1041 <xsl:param name="instructions" select="''"/>
1042 <xsl:choose>
1043 <xsl:when test="contains($instructions,'&#xA;')">
1044 <xsl:call-template name="comment-strip">
1045 <xsl:with-param name="instructions"
1046 select="substring-before($instructions,'&#xA;')"/>
1047 </xsl:call-template>
1048 <xsl:call-template name="comment-strip">
1049 <xsl:with-param name="instructions"
1050 select="substring-after($instructions,'&#xA;')"/>
1051 </xsl:call-template>
1052 </xsl:when>
1053 <xsl:when test="contains($instructions,'\*.la')">
1054 <xsl:if test="$del-la-files='n'">
1055 <xsl:text># </xsl:text>
1056 </xsl:if>
1057 <xsl:value-of select="$instructions"/>
1058 <xsl:text>&#xA;</xsl:text>
1059 </xsl:when>
1060 <xsl:when test="contains($instructions,'strip ')">
1061 <xsl:if test="$strip='n'">
1062 <xsl:text># </xsl:text>
1063 </xsl:if>
1064 <xsl:value-of select="$instructions"/>
1065 <xsl:text> || true&#xA;</xsl:text>
1066 </xsl:when>
1067 <xsl:otherwise>
1068 <xsl:value-of select="$instructions"/>
1069 <xsl:text>&#xA;</xsl:text>
1070 </xsl:otherwise>
1071 </xsl:choose>
1072 </xsl:template>
1073
1074 <xsl:template name="comment-test">
1075 <xsl:param name="instructions" select="''"/>
1076 <xsl:choose>
1077 <xsl:when test="contains($instructions,'&#xA;')">
1078 <xsl:call-template name="comment-test">
1079 <xsl:with-param name="instructions"
1080 select="substring-before($instructions,'&#xA;')"/>
1081 </xsl:call-template>
1082 <xsl:call-template name="comment-test">
1083 <xsl:with-param name="instructions"
1084 select="substring-after($instructions,'&#xA;')"/>
1085 </xsl:call-template>
1086 </xsl:when>
1087 <xsl:otherwise>
1088 <xsl:if test="$testsuite = '0' or
1089 $testsuite = '1' and
1090 not(ancestor::sect1[@id='ch-system-gcc']) and
1091 not(ancestor::sect1[@id='ch-system-glibc']) and
1092 not(ancestor::sect1[@id='ch-system-gmp']) and
1093 not(ancestor::sect1[@id='ch-system-mpfr']) and
1094 not(ancestor::sect1[@id='ch-system-binutils']) or
1095 $testsuite = '2' and
1096 ancestor::chapter[@id='chapter-temporary-tools']">
1097 <xsl:text># </xsl:text>
1098 </xsl:if>
1099 <xsl:choose>
1100 <xsl:when test="$bomb-testsuite = 'n'">
1101 <xsl:choose>
1102 <xsl:when test="contains(string(), 'make -k')">
1103 <xsl:value-of select="$instructions"/>
1104 <xsl:text> &gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
1105 </xsl:when>
1106 <xsl:when test="contains($instructions, 'make')">
1107 <xsl:value-of select="substring-before($instructions, 'make')"/>
1108 <xsl:text>make -k</xsl:text>
1109 <xsl:value-of select="substring-after($instructions, 'make')"/>
1110 <xsl:text> &gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
1111 </xsl:when>
1112 <xsl:otherwise>
1113 <xsl:value-of select="$instructions"/>
1114 <xsl:if
1115 test="not(contains($instructions, '&gt;&gt;')) and
1116 substring($instructions,
1117 string-length($instructions)) != '\'">
1118 <xsl:text> &gt;&gt; $TEST_LOG 2&gt;&amp;1</xsl:text>
1119 </xsl:if>
1120 <xsl:text>&#xA;</xsl:text>
1121 </xsl:otherwise>
1122 </xsl:choose>
1123 </xsl:when>
1124 <xsl:otherwise>
1125 <!-- bomb-testsuite != 'n'-->
1126 <xsl:choose>
1127 <xsl:when test="contains($instructions, 'make -k')">
1128 <xsl:value-of select="$instructions"/>
1129 <xsl:text> &gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
1130 </xsl:when>
1131 <xsl:otherwise>
1132 <xsl:value-of select="$instructions"/>
1133 <xsl:if test="not(contains($instructions, '&gt;&gt;')) and
1134 substring($instructions,
1135 string-length($instructions)) != '\'">
1136 <xsl:text> &gt;&gt; $TEST_LOG 2&gt;&amp;1</xsl:text>
1137 </xsl:if>
1138 <xsl:text>&#xA;</xsl:text>
1139 </xsl:otherwise>
1140 </xsl:choose>
1141 </xsl:otherwise> <!-- end not bomb-test=n -->
1142 </xsl:choose>
1143 </xsl:otherwise>
1144 </xsl:choose>
1145 </xsl:template>
1146
1147</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.