source: LFS/lfs.xsl@ 1f10495

experimental
Last change on this file since 1f10495 was 1f10495, checked in by Manuel Canales Esparcia <manuel@…>, 17 years ago

Moved system build customization templates to user.xsl.

  • Property mode set to 100644
File size: 21.8 KB
Line 
1<?xml version="1.0"?>
2
3<!-- $Id$ -->
4
5<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
6 xmlns:exsl="http://exslt.org/common"
7 extension-element-prefixes="exsl"
8 version="1.0">
9
10<!-- XSLT stylesheet to create shell scripts from LFS books. -->
11
12 <!-- Including common extensions templates -->
13 <xsl:include href="../XSL/user.xsl"/>
14
15<!-- ####################### PARAMETERS ################################### -->
16
17 <!-- Run test suites?
18 0 = none
19 1 = only chapter06 Glibc, GCC and Binutils testsuites
20 2 = all chapter06 testsuites
21 3 = all chapter05 and chapter06 testsuites
22 -->
23 <xsl:param name="testsuite">1</xsl:param>
24
25 <!-- Bomb on test suites failures?
26 n = no, I want to build the full system and review the logs
27 y = yes, bomb at the first test suite failure to can review the build dir
28 -->
29 <xsl:param name="bomb-testsuite">n</xsl:param>
30
31 <!-- Install vim-lang package? -->
32 <xsl:param name="vim-lang">y</xsl:param>
33
34 <!-- Time zone -->
35 <xsl:param name="timezone">GMT</xsl:param>
36
37 <!-- Page size -->
38 <xsl:param name="page">letter</xsl:param>
39
40 <!-- Locale setting -->
41 <xsl:param name="lang">C</xsl:param>
42
43 <!-- Custom tools support -->
44 <xsl:param name="custom-tools">n</xsl:param>
45
46 <!-- blfs-tool support -->
47 <xsl:param name="blfs-tool">n</xsl:param>
48
49
50<!-- ####################################################################### -->
51
52<!-- ########### NAMED USER TEMPLATES TO ALLOW CUSTOMIZATIONS ############## -->
53<!-- ############ Maybe should be placed on a separate file ################ -->
54
55
56 <!-- Hock for creating a custom tools directory containing scripts
57 to be run after the system has been built
58 (to be moved to a separate file) -->
59 <xsl:template name="custom-tools">
60 <!-- Fixed directory and ch_order values -->
61 <xsl:variable name="basedir">custom-tools/20_</xsl:variable>
62 <!-- Add an exsl:document block for each script to be created.
63 This one is only a dummy example. You must replace "01" by
64 the proper build order and "dummy" by the script name -->
65 <exsl:document href="{$basedir}01-dummy" method="text">
66 <xsl:call-template name="header"/>
67 <xsl:text>
68PKG_PHASE=dummy
69PACKAGE=dummy
70VERSION=0.0.0
71TARBALL=dummy-0.0.0.tar.bz2
72 </xsl:text>
73 <xsl:call-template name="disk_usage"/>
74 <xsl:call-template name="unpack"/>
75 <xsl:text>
76cd $PKGDIR
77./configure --prefix=/usr
78make
79make check
80make install
81 </xsl:text>
82 <xsl:call-template name="disk_usage"/>
83 <xsl:call-template name="clean_sources"/>
84 <xsl:call-template name="footer"/>
85 </exsl:document>
86 </xsl:template>
87
88
89<!-- ####################################################################### -->
90
91<!-- ########################### NAMED TEMPLATES ########################### -->
92
93 <!-- Chapter directory name (the same used for HTML output) -->
94 <xsl:template name="dirname">
95 <xsl:variable name="pi-dir" select="processing-instruction('dbhtml')"/>
96 <xsl:variable name="pi-dir-value" select="substring-after($pi-dir,'dir=')"/>
97 <xsl:variable name="quote-dir" select="substring($pi-dir-value,1,1)"/>
98 <xsl:variable name="dirname" select="substring-before(substring($pi-dir-value,2),$quote-dir)"/>
99 <xsl:value-of select="$dirname"/>
100 </xsl:template>
101
102
103 <!-- Base file name (the same used for HTML output) -->
104 <xsl:template name="filename">
105 <xsl:variable name="pi-file" select="processing-instruction('dbhtml')"/>
106 <xsl:variable name="pi-file-value" select="substring-after($pi-file,'filename=')"/>
107 <xsl:variable name="filename" select="substring-before(substring($pi-file-value,2),'.html')"/>
108 <xsl:value-of select="$filename"/>
109 </xsl:template>
110
111
112 <!-- Script header -->
113 <xsl:template name="header">
114 <xsl:if test="not(@id='ch-system-chroot') and
115 not(@id='ch-system-revisedchroot')">
116 <!-- Set the shabang -->
117 <xsl:choose>
118 <xsl:when test="@id='ch-system-creatingdirs' or
119 @id='ch-system-createfiles' or
120 @id='ch-system-strippingagain'">
121 <xsl:text>#!/tools/bin/bash&#xA;</xsl:text>
122 </xsl:when>
123 <xsl:otherwise>
124 <xsl:text>#!/bin/bash&#xA;</xsl:text>
125 </xsl:otherwise>
126 </xsl:choose>
127 <!-- Set +h -->
128 <xsl:text>set +h&#xA;</xsl:text>
129 <!-- Set -e -->
130 <xsl:if test="not(@id='ch-tools-stripping') and
131 not(@id='ch-system-strippingagain')">
132 <xsl:text>set -e&#xA;</xsl:text>
133 </xsl:if>
134 <!-- Dump a time stamp -->
135 <xsl:text>&#xA;echo -e "\n`date`\n"&#xA;</xsl:text>
136 </xsl:if>
137 </xsl:template>
138
139
140 <!-- Dump current disk usage -->
141 <xsl:template name="disk_usage">
142 <xsl:if test="not(@id='ch-system-chroot') and
143 not(@id='ch-system-revisedchroot')">
144 <xsl:choose>
145 <xsl:when test="ancestor::chapter[@id='chapter-temporary-tools']">
146 <xsl:text>echo -e "\nKB: `du -skx --exclude=jhalfs --exclude=lost+found $LFS`\n"&#xA;</xsl:text>
147 </xsl:when>
148 <xsl:otherwise>
149 <xsl:text>echo -e "\nKB: `du -skx --exclude=jhalfs --exclude=lost+found /`\n"&#xA;</xsl:text>
150 </xsl:otherwise>
151 </xsl:choose>
152 </xsl:if>
153 </xsl:template>
154
155
156 <!-- Enter to the sources dir, clean it, unpack the tarball,
157 and reset the seconds counter -->
158 <xsl:template name="unpack">
159 <xsl:text>cd </xsl:text>
160 <xsl:if test="ancestor::chapter[@id='chapter-temporary-tools']">
161 <xsl:text>$LFS</xsl:text>
162 </xsl:if>
163 <xsl:text>/sources
164PKGDIR=`tar -tf $TARBALL | head -n1 | sed -e 's@^./@@;s@/.*@@'`
165if [ -d $PKGDIR ]; then
166 rm -rf $PKGDIR
167fi
168if [ -d ${PKGDIR%-*}-build ]; then
169 rm -rf ${PKGDIR%-*}-build
170fi
171tar -xf $TARBALL
172SECONDS=0
173 </xsl:text>
174 </xsl:template>
175
176
177 <!-- Extra previous commands needed by the book but not inside screen tags -->
178 <xsl:template name="pre_commands">
179 <xsl:if test="sect2[@role='installation']">
180 <xsl:text>cd $PKGDIR&#xA;</xsl:text>
181 </xsl:if>
182 <xsl:if test="@id='ch-system-vim' and $vim-lang = 'y'">
183 <xsl:text>tar -xf ../$TARBALL_1 --strip-components=1&#xA;</xsl:text>
184 </xsl:if>
185 </xsl:template>
186
187
188 <!-- Extra post commands needed by the book but not inside screen tags -->
189 <xsl:template name="post_commands">
190 <xsl:if test="$testsuite='3' and @id='ch-tools-glibc'">
191 <xsl:variable name="content" select="//userinput[@remap='locale-test']"/>
192 <xsl:value-of select="substring-before($content,'/usr/lib/locale')"/>
193 <xsl:text>/tools/lib/locale</xsl:text>
194 <xsl:value-of select="substring-after($content,'/usr/lib/locale')"/>
195 </xsl:if>
196 </xsl:template>
197
198
199 <!-- Remove sources and build dirs, skipping it from seconds meassurament -->
200 <xsl:template name="clean_sources">
201 <xsl:text>cd </xsl:text>
202 <xsl:if test="ancestor::chapter[@id='chapter-temporary-tools']">
203 <xsl:text>$LFS</xsl:text>
204 </xsl:if>
205 <xsl:text>/sources
206SECS=$SECONDS
207rm -rf $PKGDIR
208rm -rf ${PKGDIR%-*}-build
209SECONDS=$SECS
210 </xsl:text>
211 </xsl:template>
212
213
214 <!-- Script footer -->
215 <xsl:template name="footer">
216 <!-- Dump the build time and exit -->
217 <xsl:if test="not(@id='ch-system-chroot') and
218 not(@id='ch-system-revisedchroot')">
219 <xsl:text>
220echo -e "\n\nTotalseconds: $SECONDS\n"
221
222exit
223 </xsl:text>
224 </xsl:if>
225 </xsl:template>
226
227
228 <!-- Extra commads needed at the start of some screen block
229 to allow automatization -->
230 <xsl:template name="top_screen_build_fixes">
231 <!-- Fix Udev reinstallation after a build failure or on iterative builds -->
232 <xsl:if test="contains(string(),'firmware,udev')">
233 <xsl:text>if [[ ! -d /lib/udev/devices ]] ; then&#xA;</xsl:text>
234 </xsl:if>
235 </xsl:template>
236
237
238 <!-- Extra commads needed at the end of some screen block
239 to allow automatization -->
240 <xsl:template name="bottom_screen_build_fixes">
241 <!-- Fix Udev reinstallation after a build failure or on iterative builds -->
242 <xsl:if test="contains(string(),'firmware,udev')">
243 <xsl:text>&#xA;fi</xsl:text>
244 </xsl:if>
245 <!-- Copying the kernel config file -->
246 <xsl:if test="string() = 'make mrproper'">
247 <xsl:text>&#xA;cp -v ../kernel-config .config</xsl:text>
248 </xsl:if>
249 <!-- Don't stop on strip run -->
250 <xsl:if test="contains(string(),'strip --strip')">
251 <xsl:text> || true</xsl:text>
252 </xsl:if>
253 </xsl:template>
254
255
256 <!-- Extract a package name from a package URL -->
257 <xsl:template name="package_name">
258 <xsl:param name="url" select="foo"/>
259 <xsl:param name="sub-url" select="substring-after($url,'/')"/>
260 <xsl:choose>
261 <xsl:when test="contains($sub-url,'/')">
262 <xsl:call-template name="package_name">
263 <xsl:with-param name="url" select="$sub-url"/>
264 </xsl:call-template>
265 </xsl:when>
266 <xsl:otherwise>
267 <xsl:value-of select="$sub-url"/>
268 </xsl:otherwise>
269 </xsl:choose>
270 </xsl:template>
271
272
273 <!-- Check if a package testsuite must be run -->
274 <xsl:template name="run_this_test">
275 <xsl:choose>
276 <xsl:when test=".//userinput[@remap='test']">
277 <xsl:choose>
278 <!-- No testsuites run on level 0 -->
279 <xsl:when test="$testsuite = '0'">0</xsl:when>
280 <!-- On level 1, only final system toolchain testsuites are run -->
281 <xsl:when test="$testsuite = '1' and
282 not(@id='ch-system-gcc') and
283 not(@id='ch-system-glibc') and
284 not(@id='ch-system-binutils')">0</xsl:when>
285 <!-- On level 2, temp tools testsuites are not run -->
286 <xsl:when test="$testsuite = '2' and
287 ../@id='chapter-temporary-tools'">0</xsl:when>
288 <xsl:otherwise>1</xsl:otherwise>
289 </xsl:choose>
290 </xsl:when>
291 <xsl:otherwise>0</xsl:otherwise>
292 </xsl:choose>
293 </xsl:template>
294
295
296 <!-- Adds blfs-tool support scripts (to be moved to a separate file) -->
297 <xsl:template name="blfs-tool">
298 <!-- Fixed directory and ch_order values -->
299 <xsl:variable name="basedir">blfs-tool-deps/30_</xsl:variable>
300 <!-- One exsl:document block for each blfs-tool dependency
301 TO BE WRITTEN -->
302 <exsl:document href="{$basedir}01-dummy" method="text">
303 <xsl:call-template name="header"/>
304 <xsl:text>
305PKG_PHASE=dummy
306PACKAGE=dummy
307VERSION=0.0.0
308TARBALL=dummy-0.0.0.tar.bz2
309 </xsl:text>
310 <xsl:call-template name="disk_usage"/>
311 <xsl:call-template name="unpack"/>
312 <xsl:text>
313cd $PKGDIR
314./configure --prefix=/usr
315make
316make check
317make install
318 </xsl:text>
319 <xsl:call-template name="disk_usage"/>
320 <xsl:call-template name="clean_sources"/>
321 <xsl:call-template name="footer"/>
322 </exsl:document>
323 </xsl:template>
324
325
326<!-- ######################################################################## -->
327
328<!-- ############################# MATCH TEMPLATES ########################## -->
329
330 <!-- Root element -->
331 <xsl:template match="/">
332 <!-- Start processing at chapter level -->
333 <xsl:apply-templates select="//chapter"/>
334 <!-- Process custom tools scripts -->
335 <xsl:if test="$custom-tools = 'y'">
336 <xsl:call-template name="custom-tools"/>
337 </xsl:if>
338 <!-- Process blfs-tool scripts -->
339 <xsl:if test="$blfs-tool = 'y'">
340 <xsl:call-template name="blfs-tool"/>
341 </xsl:if>
342 </xsl:template>
343
344
345 <!-- chapter -->
346 <xsl:template match="chapter">
347 <xsl:if test="@id='chapter-temporary-tools' or @id='chapter-building-system'
348 or @id='chapter-bootscripts' or @id='chapter-bootable'">
349 <!-- The dir name -->
350 <xsl:variable name="dirname">
351 <xsl:call-template name="dirname"/>
352 </xsl:variable>
353 <!-- The chapter order position -->
354 <xsl:variable name="ch_position" select="position()"/>
355 <xsl:variable name="ch_order">
356 <xsl:choose>
357 <xsl:when test="string-length($ch_position) = 1">
358 <xsl:text>0</xsl:text>
359 <xsl:value-of select="$ch_position"/>
360 </xsl:when>
361 <xsl:otherwise>
362 <xsl:value-of select="$ch_position"/>
363 </xsl:otherwise>
364 </xsl:choose>
365 </xsl:variable>
366 <!-- Process the childrens -->
367 <xsl:apply-templates select="sect1">
368 <xsl:with-param name="ch_order" select="$ch_order"/>
369 <xsl:with-param name="dirname" select="$dirname"/>
370 </xsl:apply-templates>
371 </xsl:if>
372 </xsl:template>
373
374
375 <!-- sect1 -->
376 <xsl:template match="sect1">
377 <!-- Inherited chapter order -->
378 <xsl:param name="ch_order" select="foo"/>
379 <!-- Inherited dir name -->
380 <xsl:param name="dirname" select="foo"/>
381 <!-- Process only files with actual build commands -->
382 <xsl:if test="count(descendant::screen/userinput) &gt; 0 and
383 count(descendant::screen/userinput) &gt;
384 count(descendant::screen[@role='nodump'])">
385 <!-- Base file name -->
386 <xsl:variable name="filename">
387 <xsl:call-template name="filename"/>
388 </xsl:variable>
389 <!-- Sect1 order position -->
390 <xsl:variable name="sect1_position" select="position()"/>
391 <xsl:variable name="sect1_order">
392 <xsl:choose>
393 <xsl:when test="string-length($sect1_position) = 1">
394 <xsl:text>0</xsl:text>
395 <xsl:value-of select="$sect1_position"/>
396 </xsl:when>
397 <xsl:otherwise>
398 <xsl:value-of select="$sect1_position"/>
399 </xsl:otherwise>
400 </xsl:choose>
401 </xsl:variable>
402 <!-- Script build order -->
403 <xsl:variable name="order" select="concat($dirname,'/',$ch_order,'_',$sect1_order)"/>
404 <!-- Must the package test suite, if any, be run? -->
405 <xsl:variable name="run_this_test">
406 <xsl:call-template name="run_this_test"/>
407 </xsl:variable>
408 <!-- Hock to insert scripts before the current one -->
409 <xsl:call-template name="insert_script_before">
410 <xsl:with-param name="reference" select="@id"/>
411 <xsl:with-param name="order" select="$order"/>
412 </xsl:call-template>
413 <!-- Creating dirs and files -->
414 <exsl:document href="{$order}-{$filename}" method="text">
415 <xsl:call-template name="header"/>
416 <xsl:call-template name="user_header"/>
417 <xsl:apply-templates select="sect1info[@condition='script']">
418 <xsl:with-param name="phase" select="$filename"/>
419 <xsl:with-param name="run_this_test" select="$run_this_test"/>
420 <xsl:with-param name="testlogfile" select="concat($ch_order,'_',$sect1_order,'-',$filename)"/>
421 </xsl:apply-templates>
422 <xsl:call-template name="disk_usage"/>
423 <xsl:if test="sect2[@role='installation']">
424 <xsl:call-template name="unpack"/>
425 </xsl:if>
426 <xsl:call-template name="user_pre_commands"/>
427 <xsl:call-template name="pre_commands"/>
428 <xsl:apply-templates select=".//screen">
429 <xsl:with-param name="run_this_test" select="$run_this_test"/>
430 </xsl:apply-templates>
431 <xsl:call-template name="post_commands"/>
432 <xsl:call-template name="user_footer"/>
433 <xsl:call-template name="disk_usage"/>
434 <xsl:if test="sect2[@role='installation']">
435 <xsl:call-template name="clean_sources"/>
436 </xsl:if>
437 <xsl:call-template name="footer"/>
438 </exsl:document>
439 <!-- Hock to insert scripts after the current one -->
440 <xsl:call-template name="insert_script_after">
441 <xsl:with-param name="reference" select="@id"/>
442 <xsl:with-param name="order" select="$order"/>
443 </xsl:call-template>
444 </xsl:if>
445 </xsl:template>
446
447
448 <!-- sect1info -->
449 <xsl:template match="sect1info">
450 <!-- Used to set and initialize the testuite log file -->
451 <xsl:param name="testlogfile" select="foo"/>
452 <xsl:param name="run_this_test" select="foo"/>
453 <!-- Build phase (base file name) to be used for PM -->
454 <xsl:param name="phase" select="foo"/>
455 <xsl:text>&#xA;PKG_PHASE=</xsl:text>
456 <xsl:value-of select="$phase"/>
457 <!-- Package name -->
458 <xsl:apply-templates select="productname"/>
459 <!-- Package version -->
460 <xsl:apply-templates select="productnumber"/>
461 <!-- Tarball name -->
462 <xsl:apply-templates select="address"/>
463 <xsl:if test="$run_this_test = '1'">
464 <xsl:text>&#xA;TEST_LOG=</xsl:text>
465 <xsl:if test="ancestor::chapter[@id='chapter-temporary-tools']">
466 <xsl:text>$LFS</xsl:text>
467 </xsl:if>
468 <xsl:text>/jhalfs/test-logs/</xsl:text>
469 <xsl:value-of select="$testlogfile"/>
470 <xsl:text>&#xA;echo -e "\n`date`\n" > $TEST_LOG</xsl:text>
471 </xsl:if>
472 <xsl:text>&#xA;&#xA;</xsl:text>
473 </xsl:template>
474
475
476 <!-- productname -->
477 <xsl:template match="productname">
478 <xsl:text>&#xA;PACKAGE=</xsl:text>
479 <xsl:apply-templates/>
480 </xsl:template>
481
482
483 <!-- productnumber -->
484 <xsl:template match="productnumber">
485 <xsl:text>&#xA;VERSION=</xsl:text>
486 <xsl:apply-templates/>
487 </xsl:template>
488
489
490 <!-- address -->
491 <xsl:template match="address">
492 <xsl:text>&#xA;TARBALL=</xsl:text>
493 <xsl:call-template name="package_name">
494 <xsl:with-param name="url">
495 <xsl:apply-templates/>
496 </xsl:with-param>
497 </xsl:call-template>
498 <xsl:apply-templates select="otheraddr" mode="tarball"/>
499 </xsl:template>
500
501
502 <!-- otheraddr -->
503 <xsl:template match="otheraddr"/>
504 <xsl:template match="otheraddr" mode="tarball">
505 <xsl:text>&#xA;TARBALL_</xsl:text>
506 <xsl:value-of select="position()"/>
507 <xsl:text>=</xsl:text>
508 <xsl:call-template name="package_name">
509 <xsl:with-param name="url" select="."/>
510 </xsl:call-template>
511 </xsl:template>
512
513
514 <!-- screen -->
515 <xsl:template match="screen">
516 <xsl:param name="run_this_test" select="foo"/>
517 <xsl:if test="child::* = userinput and not(@role = 'nodump')">
518 <xsl:call-template name="top_screen_build_fixes"/>
519 <xsl:apply-templates>
520 <xsl:with-param name="run_this_test" select="$run_this_test"/>
521 </xsl:apply-templates>
522 <xsl:call-template name="bottom_screen_build_fixes"/>
523 <xsl:text>&#xA;</xsl:text>
524 </xsl:if>
525 </xsl:template>
526
527
528 <!-- userinput @remap='test' -->
529 <xsl:template match="userinput[@remap='test']">
530 <xsl:param name="run_this_test" select="foo"/>
531 <xsl:apply-templates select="." mode="test">
532 <xsl:with-param name="run_this_test" select="$run_this_test"/>
533 </xsl:apply-templates>
534 </xsl:template>
535
536
537 <!-- replaceable -->
538 <xsl:template match="replaceable">
539 <xsl:choose>
540 <!-- Configuring the Time Zone -->
541 <xsl:when test="ancestor::sect2[@id='conf-glibc'] and string()='&lt;xxx&gt;'">
542 <xsl:value-of select="$timezone"/>
543 </xsl:when>
544 <!-- Set paper size for Groff build -->
545 <xsl:when test="string()='&lt;paper_size&gt;'">
546 <xsl:value-of select="$page"/>
547 </xsl:when>
548 <!-- LANG setting in /etc/profile -->
549 <xsl:when test="contains(string(),'&lt;ll&gt;_&lt;CC&gt;')">
550 <xsl:value-of select="$lang"/>
551 </xsl:when>
552 <xsl:otherwise>
553 <xsl:text>**EDITME</xsl:text>
554 <xsl:apply-templates/>
555 <xsl:text>EDITME**</xsl:text>
556 </xsl:otherwise>
557 </xsl:choose>
558 </xsl:template>
559
560
561<!-- ######################################################################## -->
562
563<!-- ############################# MODE TEMPLATES ########################### -->
564
565
566 <!-- mode test -->
567 <xsl:template match="userinput" mode="test">
568 <xsl:param name="run_this_test" select="foo"/>
569 <xsl:if test="$run_this_test = '1'">
570 <xsl:choose>
571 <!-- Final system Glibc -->
572 <xsl:when test="contains(string(),'glibc-check-log')">
573 <xsl:value-of select="substring-before(string(),'2&gt;&amp;1')"/>
574 <xsl:text>&gt;&gt; $TEST_LOG 2&gt;&amp;1 || true</xsl:text>
575 </xsl:when>
576 <!-- Module-Init-Tools -->
577 <xsl:when test="ancestor::sect1[@id='ch-system-module-init-tools']
578 and contains(string(),'make check')">
579 <xsl:value-of select="substring-before(string(),' check')"/>
580 <xsl:if test="$bomb-testsuite = 'n'">
581 <xsl:text> -k</xsl:text>
582 </xsl:if>
583 <xsl:text> check &gt;&gt; $TEST_LOG 2&gt;&amp;1</xsl:text>
584 <xsl:if test="$bomb-testsuite = 'n'">
585 <xsl:text> || true</xsl:text>
586 </xsl:if>
587 <xsl:value-of select="substring-after(string(),' check')"/>
588 </xsl:when>
589 <!-- If the book uses -k, the testsuite should never bomb -->
590 <xsl:when test="contains(string(),'make -k ')">
591 <xsl:apply-templates select="." mode="default"/>
592 <xsl:text> &gt;&gt; $TEST_LOG 2&gt;&amp;1 || true</xsl:text>
593 </xsl:when>
594 <!-- Extra commands in Binutils and GCC -->
595 <xsl:when test="contains(string(),'test_summary') or
596 contains(string(),'expect -c')">
597 <xsl:apply-templates select="." mode="default"/>
598 <xsl:text> &gt;&gt; $TEST_LOG</xsl:text>
599 </xsl:when>
600 <!-- Remaining extra testsuite commads that don't need be hacked -->
601 <xsl:when test="not(contains(string(),'make '))">
602 <xsl:apply-templates select="." mode="default"/>
603 </xsl:when>
604 <!-- Normal testsites run -->
605 <xsl:otherwise>
606 <xsl:choose>
607 <!-- No bomb on failures -->
608 <xsl:when test="$bomb-testsuite = 'n'">
609 <xsl:value-of select="substring-before(string(),'make ')"/>
610 <xsl:text>make -k </xsl:text>
611 <xsl:value-of select="substring-after(string(),'make ')"/>
612 <xsl:text> &gt;&gt; $TEST_LOG 2&gt;&amp;1 || true</xsl:text>
613 </xsl:when>
614 <!-- Bomb at the first failure -->
615 <xsl:otherwise>
616 <xsl:apply-templates select="." mode="default"/>
617 <xsl:text> &gt;&gt; $TEST_LOG 2&gt;&amp;1</xsl:text>
618 </xsl:otherwise>
619 </xsl:choose>
620 </xsl:otherwise>
621 </xsl:choose>
622 </xsl:if>
623 </xsl:template>
624
625</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.