source: LFS/lfs.xsl@ e6e0c85

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

Fix a long standing bug in lfs.xsl, which tried to use packageManager.xml
when Package management was not in use, resulting in errors in
000-masterscript.log
Also correct a typo

  • Property mode set to 100644
File size: 23.5 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 <!-- use package management ?
12 n = no, original behavior
13 y = yes, add PKG_DEST to scripts in install commands of chapter06-08
14 -->
15 <xsl:param name="pkgmngt" select="n"/>
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" select="1"/>
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" select="n"/>
30
31 <!-- Install vim-lang package? OBSOLETE should always be 'n'-->
32 <xsl:param name="vim-lang" select="n"/>
33
34 <!-- Time zone -->
35 <xsl:param name="timezone" select="GMT"/>
36
37 <!-- Page size -->
38 <xsl:param name="page" select="letter"/>
39
40 <!-- Locale settings -->
41 <xsl:param name="lang" select="C"/>
42
43 <!-- Install the whole set of locales -->
44 <xsl:param name='full-locale' select='n'/>
45
46 <xsl:template match="/">
47 <xsl:apply-templates select="//sect1"/>
48 </xsl:template>
49
50 <xsl:template match="sect1">
51 <xsl:if test="(../@id='chapter-temporary-tools' or
52 ../@id='chapter-building-system' or
53 ../@id='chapter-bootscripts' or
54 ../@id='chapter-bootable') and
55 count(descendant::screen/userinput) &gt; 0 and
56 count(descendant::screen/userinput) &gt;
57 count(descendant::screen[@role='nodump']) and
58 count(descendant::screen/userinput) &gt;
59 count(descendant::screen/userinput[starts-with(string(),'chroot')])">
60<!-- The last condition is a hack to allow previous versions of the
61 book where the chroot commands did not have role="nodump".
62 It only works if the chroot command is the only one on the page -->
63 <!-- The dirs names -->
64 <xsl:variable name="pi-dir" select="../processing-instruction('dbhtml')"/>
65 <xsl:variable name="pi-dir-value" select="substring-after($pi-dir,'dir=')"/>
66 <xsl:variable name="quote-dir" select="substring($pi-dir-value,1,1)"/>
67 <xsl:variable name="dirname" select="substring-before(substring($pi-dir-value,2),$quote-dir)"/>
68 <!-- The file names -->
69 <xsl:variable name="pi-file" select="processing-instruction('dbhtml')"/>
70 <xsl:variable name="pi-file-value" select="substring-after($pi-file,'filename=')"/>
71 <xsl:variable name="filename" select="substring-before(substring($pi-file-value,2),'.html')"/>
72 <!-- The build order -->
73 <xsl:variable name="position" select="position()"/>
74 <xsl:variable name="order">
75 <xsl:choose>
76 <xsl:when test="string-length($position) = 1">
77 <xsl:text>00</xsl:text>
78 <xsl:value-of select="$position"/>
79 </xsl:when>
80 <xsl:when test="string-length($position) = 2">
81 <xsl:text>0</xsl:text>
82 <xsl:value-of select="$position"/>
83 </xsl:when>
84 <xsl:otherwise>
85 <xsl:value-of select="$position"/>
86 </xsl:otherwise>
87 </xsl:choose>
88 </xsl:variable>
89 <!-- Inclusion of package manager scriptlets -->
90 <xsl:if test="@id='ch-tools-stripping' and $pkgmngt='y'">
91 <xsl:apply-templates
92 select="document('packageManager.xml')//sect1[contains(@id,'ch-tools')]"
93 mode="pkgmngt">
94 <xsl:with-param name="order" select="$order"/>
95 <xsl:with-param name="dirname" select="$dirname"/>
96 </xsl:apply-templates>
97 </xsl:if>
98 <xsl:if test="@id='ch-system-strippingagain' and $pkgmngt='y'">
99 <xsl:apply-templates
100 select="document('packageManager.xml')//sect1[contains(@id,'ch-system')]"
101 mode="pkgmngt">
102 <xsl:with-param name="order" select="$order"/>
103 <xsl:with-param name="dirname" select="$dirname"/>
104 </xsl:apply-templates>
105 </xsl:if>
106 <!-- Creating dirs and files -->
107 <exsl:document href="{$dirname}/{$order}-{$filename}" method="text">
108 <xsl:choose>
109 <xsl:when test="@id='ch-system-creatingdirs' or
110 @id='ch-system-createfiles' or
111 @id='ch-system-strippingagain'">
112 <xsl:text>#!/tools/bin/bash&#xA;set +h&#xA;</xsl:text>
113 </xsl:when>
114 <xsl:otherwise>
115 <xsl:text>#!/bin/bash&#xA;set +h&#xA;</xsl:text>
116 </xsl:otherwise>
117 </xsl:choose>
118 <xsl:if test="not(@id='ch-tools-stripping') and
119 not(@id='ch-system-strippingagain')">
120 <xsl:text>set -e&#xA;</xsl:text>
121 </xsl:if>
122 <xsl:text>&#xA;</xsl:text>
123 <xsl:if test="sect2[@role='installation']">
124 <xsl:text>cd $PKGDIR&#xA;</xsl:text>
125 </xsl:if>
126 <xsl:apply-templates select="sect2|
127 screen[not(@role) or
128 @role!='nodump']/userinput"/>
129 <xsl:if test="@id='ch-system-creatingdirs' and $pkgmngt='y'">
130 <xsl:apply-templates
131 select="document('packageManager.xml')//sect1[
132 @id='ch-pkgmngt-creatingdirs'
133 ]//userinput"
134 mode="pkgmngt"/>
135 </xsl:if>
136 <xsl:if test="@id='ch-system-createfiles' and $pkgmngt='y'">
137 <xsl:apply-templates
138 select="document('packageManager.xml')//sect1[
139 @id='ch-pkgmngt-createfiles'
140 ]//userinput"
141 mode="pkgmngt"/>
142 </xsl:if>
143 <xsl:text>echo -e "\n\nTotalseconds: $SECONDS\n"&#xA;</xsl:text>
144 <xsl:text>exit&#xA;</xsl:text>
145 </exsl:document>
146 </xsl:if>
147 </xsl:template>
148
149 <xsl:template match="sect2">
150 <xsl:apply-templates
151 select=".//screen[not(@role) or
152 @role != 'nodump']/userinput[
153 @remap = 'pre' or
154 @remap = 'configure' or
155 @remap = 'make' or
156 @remap = 'test' and
157 not(current()/../@id='ch-tools-dejagnu')]"/>
158 <xsl:if
159 test="ancestor::chapter[@id != 'chapter-temporary-tools'] and
160 $pkgmngt = 'y' and
161 descendant::screen[not(@role) or
162 @role != 'nodump']/userinput[
163 @remap='install']">
164 <xsl:text>mkdir -pv $PKG_DEST/{boot,etc,lib,bin,sbin}
165mkdir -pv $PKG_DEST/usr/{lib,bin,sbin,include}
166mkdir -pv $PKG_DEST/usr/share/{doc,info,man}
167mkdir -pv $PKG_DEST/usr/share/man/man{1..8}
168ln -sv share/{man,doc,info} $PKG_DEST/usr
169case $(uname -m) in
170 x86_64) ln -sv lib $PKG_DEST/lib64 &amp;&amp; ln -sv lib $PKG_DEST/usr/lib64 ;;
171esac
172</xsl:text>
173 </xsl:if>
174 <xsl:if test="../@id = 'ch-system-glibc' and
175 @role='installation' and
176 $pkgmngt = 'y'">
177 <xsl:text>mkdir -pv $PKG_DEST/usr/include/{rpc,rpcsvc}
178</xsl:text>
179 </xsl:if>
180 <xsl:apply-templates
181 select=".//screen[not(@role) or
182 @role != 'nodump']/userinput[@remap = 'install']"/>
183 <xsl:if test="ancestor::chapter[@id != 'chapter-temporary-tools'] and
184 $pkgmngt = 'y' and
185 descendant::screen[not(@role) or
186 @role != 'nodump']/userinput[
187 @remap='install']">
188 <xsl:if test="../@id = 'ch-system-man-pages'">
189<!-- these files are provided by the shadow package -->
190 <xsl:text>rm -fv $PKG_DEST/usr/share/man/{man3/getspnam.3,man5/passwd.5}
191</xsl:text>
192 </xsl:if>
193<!-- Attr man/man2 pages are already installed by man-pages. As of
194 March 2013, they are the same pages. Check it sometimes... -->
195 <xsl:if test="../@id = 'ch-system-attr'">
196 <xsl:text>rm -fv $PKG_DEST/usr/share/man/man2/*
197</xsl:text>
198 </xsl:if>
199 <xsl:text>rm -fv $PKG_DEST/{,usr/}lib64
200rm -fv $PKG_DEST/usr/{man,doc,info}
201for dir in $PKG_DEST/usr/share/man/man{1..8}; do
202 [[ -z $(ls $dir) ]] &amp;&amp; rmdir -v $dir
203done
204for dir in $PKG_DEST/usr/share/{doc,info,man}; do
205 [[ -z $(ls $dir) ]] &amp;&amp; rmdir -v $dir
206done
207for dir in $PKG_DEST/usr/{lib,bin,sbin,include}; do
208 [[ -z $(ls $dir) ]] &amp;&amp; rmdir -v $dir
209done
210for dir in $PKG_DEST/{boot,etc,lib,bin,sbin}; do
211 [[ -z $(ls $dir) ]] &amp;&amp; rmdir -v $dir
212done
213packInstall
214rm -rf $PKG_DEST
215</xsl:text>
216 </xsl:if>
217 <xsl:if test="$testsuite='3' and
218 ../@id='ch-tools-glibc' and
219 @role='installation'">
220 <xsl:copy-of select="//userinput[@remap='locale-test']"/>
221 <xsl:text>&#xA;</xsl:text>
222 </xsl:if>
223 <xsl:if test="../@id='ch-system-glibc' and @role='installation'">
224 <xsl:choose>
225 <xsl:when test="$full-locale='y'">
226 <xsl:copy-of select="//userinput[@remap='locale-full']"/>
227 <xsl:text>&#xA;</xsl:text>
228 </xsl:when>
229 <xsl:otherwise>
230 <xsl:copy-of select="//userinput[@remap='locale-test']"/>
231 <xsl:text>&#xA;</xsl:text>
232 <xsl:if test="not(contains(string(//userinput[@remap='locale-test']),$lang)) and $lang!='C' and $lang!='POSIX'">
233 <xsl:text>if LOCALE=`grep "</xsl:text>
234 <xsl:value-of select="$lang"/>
235 <xsl:text>/" $PKGDIR/localedata/SUPPORTED`; then
236 CHARMAP=`echo $LOCALE | sed 's,[^/]*/\([^ ]*\) [\],\1,'`
237 INPUT=`echo $LOCALE | sed 's,[/.].*,,'`
238 LOCALE=`echo $LOCALE | sed 's,/.*,,'`
239 localedef -i $INPUT -f $CHARMAP $LOCALE
240fi
241</xsl:text>
242 </xsl:if>
243 </xsl:otherwise>
244 </xsl:choose>
245 </xsl:if>
246 <xsl:apply-templates
247 select=".//screen[
248 not(@role) or
249 @role != 'nodump'
250 ]/userinput[
251 not(@remap) or
252 @remap='adjust' or
253 @remap='test' and current()/../@id='ch-tools-dejagnu'
254 ]"/>
255 </xsl:template>
256
257 <xsl:template match="sect1" mode="pkgmngt">
258 <xsl:param name="dirname" select="chapter05"/>
259 <!-- The build order -->
260 <xsl:param name="order" select="062"/>
261<!-- The file names -->
262 <xsl:variable name="pi-file" select="processing-instruction('dbhtml')"/>
263 <xsl:variable name="pi-file-value" select="substring-after($pi-file,'filename=')"/>
264 <xsl:variable name="filename" select="substring-before(substring($pi-file-value,2),'.html')"/>
265 <!-- Creating dirs and files -->
266 <xsl:if test="count(descendant::screen/userinput) &gt; 0 and
267 count(descendant::screen/userinput) &gt;
268 count(descendant::screen[@role='nodump'])">
269 <exsl:document href="{$dirname}/{$order}-{position()}-{$filename}"
270 method="text">
271 <xsl:text>#!/bin/bash
272set +h
273set -e
274
275cd $PKGDIR
276</xsl:text>
277 <xsl:apply-templates
278 select=".//screen[not(@role) or
279 @role != 'nodump']/userinput[@remap != 'adjust']"
280 mode="pkgmngt"/>
281 <xsl:if test="$dirname = 'chapter06'">
282 <xsl:text>packInstall
283rm -rf $PKG_DEST
284</xsl:text>
285 </xsl:if>
286 <xsl:apply-templates
287 select=".//screen[not(@role) or
288 @role != 'nodump'
289 ]/userinput[not(@remap) or
290 @remap='adjust'
291 ]"
292 mode="pkgmngt"/>
293 <xsl:text>
294echo -e "\n\nTotalseconds: $SECONDS\n"
295exit
296</xsl:text>
297 </exsl:document>
298 </xsl:if>
299 </xsl:template>
300
301 <xsl:template match="userinput" mode="pkgmngt">
302 <xsl:apply-templates/>
303 <xsl:text>&#xA;</xsl:text>
304 </xsl:template>
305
306 <xsl:template match="userinput">
307 <xsl:choose>
308 <!-- Copying the kernel config file -->
309 <xsl:when test="string() = 'make mrproper'">
310 <xsl:text>make mrproper&#xA;</xsl:text>
311 <xsl:if test="ancestor::sect1[@id='ch-bootable-kernel']">
312 <xsl:text>cp -v ../kernel-config .config&#xA;</xsl:text>
313 </xsl:if>
314 </xsl:when>
315<!-- test instructions -->
316 <xsl:when test="@remap = 'test'">
317 <xsl:choose>
318 <xsl:when test="$testsuite = '0'"/>
319 <xsl:when test="$testsuite = '1' and
320 not(ancestor::sect1[@id='ch-system-gcc']) and
321 not(ancestor::sect1[@id='ch-system-glibc']) and
322 not(ancestor::sect1[@id='ch-system-gmp']) and
323 not(ancestor::sect1[@id='ch-system-mpfr']) and
324 not(ancestor::sect1[@id='ch-system-binutils'])"/>
325 <xsl:when test="$testsuite = '2' and
326 ancestor::chapter[@id='chapter-temporary-tools']"/>
327 <xsl:otherwise>
328 <xsl:choose>
329 <xsl:when test="$bomb-testsuite = 'n'">
330 <xsl:choose>
331 <!-- special case for glibc -->
332 <xsl:when test="contains(string(), 'glibc-check-log')">
333 <xsl:value-of
334 select="substring-before(string(),'2&gt;&amp;1')"/>
335 <xsl:text>&gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
336 </xsl:when>
337 <!-- special case for procps-ng -->
338 <xsl:when test="contains(string(), 'pushd')">
339 <xsl:text>{ </xsl:text>
340 <xsl:apply-templates/>
341 <xsl:text>; } &gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
342 </xsl:when>
343 <xsl:when test="contains(string(), 'make -k')">
344 <xsl:apply-templates/>
345 <xsl:text> &gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
346 </xsl:when>
347 <xsl:when test="contains(string(), 'make')">
348 <xsl:value-of select="substring-before(string(),'make')"/>
349 <xsl:text>make -k</xsl:text>
350 <xsl:value-of select="substring-after(string(),'make')"/>
351 <xsl:text> &gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
352 </xsl:when>
353 <xsl:otherwise>
354 <xsl:apply-templates/>
355 <xsl:if test="not(contains(string(), '&gt;&gt;'))">
356 <xsl:text> &gt;&gt; $TEST_LOG 2&gt;&amp;1</xsl:text>
357 </xsl:if>
358 <xsl:text>&#xA;</xsl:text>
359 </xsl:otherwise>
360 </xsl:choose>
361 </xsl:when>
362 <xsl:otherwise>
363 <!-- bomb-testsuite != 'n'-->
364 <xsl:choose>
365 <!-- special case for glibc -->
366 <xsl:when test="contains(string(), 'glibc-check-log')">
367 <xsl:value-of
368 select="substring-before(string(),'2&gt;&amp;1')"/>
369 <xsl:text>&gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
370 </xsl:when>
371 <!-- special case for gmp -->
372 <xsl:when test="contains(string(), 'tee gmp-check-log')">
373 <xsl:text>(</xsl:text>
374 <xsl:apply-templates/>
375 <xsl:text>&gt;&gt; $TEST_LOG 2&gt;&amp;1 &amp;&amp; exit $PIPESTATUS)&#xA;</xsl:text>
376 </xsl:when>
377 <!-- special case for procps-ng -->
378 <xsl:when test="contains(string(), 'pushd')">
379 <xsl:text>{ </xsl:text>
380 <xsl:apply-templates/>
381 <xsl:text>; } &gt;&gt; $TEST_LOG 2&gt;&amp;1&#xA;</xsl:text>
382 </xsl:when>
383 <xsl:when test="contains(string(), 'make -k')">
384 <xsl:apply-templates/>
385 <xsl:text> &gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
386 </xsl:when>
387 <xsl:otherwise>
388 <xsl:apply-templates/>
389 <xsl:if test="not(contains(string(), '&gt;&gt;'))">
390 <xsl:text> &gt;&gt; $TEST_LOG 2&gt;&amp;1</xsl:text>
391 </xsl:if>
392 <xsl:text>&#xA;</xsl:text>
393 </xsl:otherwise>
394 </xsl:choose>
395 </xsl:otherwise>
396 </xsl:choose>
397 </xsl:otherwise>
398 </xsl:choose>
399 </xsl:when>
400<!-- End of test instructions -->
401 <!-- Don't stop on strip run -->
402 <xsl:when test="contains(string(),'strip ')">
403 <xsl:apply-templates/>
404 <xsl:text> || true&#xA;</xsl:text>
405 </xsl:when>
406<!-- Package management -->
407<!-- Add $PKG_DEST to installation commands -->
408 <xsl:when test="@remap='install' and
409 not(ancestor::chapter[
410 @id='chapter-temporary-tools'
411 ])">
412 <xsl:choose>
413 <xsl:when test="$pkgmngt='n'">
414 <xsl:choose>
415 <xsl:when test="contains(string(),'firmware,udev')">
416 <xsl:text>if [[ ! -d /lib/udev/devices ]] ; then&#xA;</xsl:text>
417 <xsl:apply-templates/>
418 <xsl:text>&#xA;fi&#xA;</xsl:text>
419 </xsl:when>
420 <xsl:otherwise>
421 <xsl:apply-templates/>
422 <xsl:text>&#xA;</xsl:text>
423 </xsl:otherwise>
424 </xsl:choose>
425 </xsl:when>
426 <xsl:otherwise><!--pkgmngt = 'y'-->
427 <xsl:choose>
428 <xsl:when test="./literal">
429 <xsl:call-template name="outputpkgdest">
430 <xsl:with-param name="outputstring" select="text()[1]"/>
431 </xsl:call-template>
432 <xsl:apply-templates select="literal"/>
433 <xsl:call-template name="outputpkgdest">
434 <xsl:with-param name="outputstring" select="text()[2]"/>
435 </xsl:call-template>
436 </xsl:when>
437 <xsl:otherwise>
438 <xsl:call-template name="outputpkgdest">
439 <xsl:with-param name="outputstring" select="string()"/>
440 </xsl:call-template>
441 </xsl:otherwise>
442 </xsl:choose>
443 </xsl:otherwise>
444 </xsl:choose>
445 </xsl:when>
446 <!-- End addition for package management -->
447 <!-- The rest of commands -->
448 <xsl:otherwise>
449 <xsl:apply-templates/>
450 <xsl:text>&#xA;</xsl:text>
451 </xsl:otherwise>
452 </xsl:choose>
453 </xsl:template>
454
455 <xsl:template match="replaceable">
456 <xsl:choose>
457 <xsl:when test="ancestor::sect1[@id='ch-system-glibc']">
458 <xsl:value-of select="$timezone"/>
459 </xsl:when>
460 <xsl:when test="ancestor::sect1[@id='ch-system-groff']">
461 <xsl:value-of select="$page"/>
462 </xsl:when>
463 <xsl:when test="contains(string(.),'&lt;ll&gt;_&lt;CC&gt;')">
464 <xsl:value-of select="$lang"/>
465 </xsl:when>
466 <xsl:otherwise>
467 <xsl:text>**EDITME</xsl:text>
468 <xsl:apply-templates/>
469 <xsl:text>EDITME**</xsl:text>
470 </xsl:otherwise>
471 </xsl:choose>
472 </xsl:template>
473
474 <xsl:template name="outputpkgdest">
475 <xsl:param name="outputstring" select="foo"/>
476 <xsl:choose>
477 <xsl:when test="contains($outputstring,'make ')">
478 <xsl:choose>
479 <xsl:when test="not(starts-with($outputstring,'make'))">
480 <xsl:call-template name="outputpkgdest">
481 <xsl:with-param name="outputstring"
482 select="substring-before($outputstring,'make')"/>
483 </xsl:call-template>
484 <xsl:call-template name="outputpkgdest">
485 <xsl:with-param
486 name="outputstring"
487 select="substring-after($outputstring,
488 substring-before($outputstring,'make'))"/>
489 </xsl:call-template>
490 </xsl:when>
491 <xsl:otherwise>
492 <xsl:choose>
493<!-- special cases (no DESTDIR) here -->
494 <xsl:when test="ancestor::sect1[@id='ch-system-glibc']">
495 <xsl:text>make install_root=$PKG_DEST -j1</xsl:text>
496 <xsl:value-of
497 select="substring-before(substring-after(string(),'make'),
498 'install')"/>
499 <xsl:text>install&#xA;</xsl:text>
500 </xsl:when>
501 <xsl:when test="ancestor::sect1[@id='ch-system-bzip2']">
502 <xsl:text>make PREFIX=$PKG_DEST/usr install&#xA;</xsl:text>
503 </xsl:when>
504 <xsl:when test="ancestor::sect1[@id='ch-system-sysklogd']">
505 <xsl:text>make BINDIR=$PKG_DEST/sbin prefix=$PKG_DEST install&#xA;</xsl:text>
506 </xsl:when>
507 <xsl:when test="ancestor::sect1[@id='ch-system-iproute2']">
508 <xsl:text>make DESTDIR=$PKG_DEST</xsl:text>
509 <xsl:value-of
510 select="substring-before(substring-after(string(),'DESTDIR='),
511 'install')"/>
512 <xsl:text>install&#xA;</xsl:text>
513 </xsl:when>
514 <xsl:when test="ancestor::sect1[@id='ch-system-sysvinit']">
515 <xsl:text>make ROOT=$PKG_DEST</xsl:text>
516 <xsl:value-of
517 select="substring-before(substring-after(string(),'make'),
518 'install')"/>
519 <xsl:text>install&#xA;</xsl:text>
520 </xsl:when>
521 <xsl:when test="ancestor::sect1[@id='ch-bootable-kernel']">
522 <xsl:text>make INSTALL_MOD_PATH=$PKG_DEST</xsl:text>
523 <xsl:value-of
524 select="substring-before(substring-after(string(),'make'),
525 'install')"/>
526 <xsl:text>install&#xA;</xsl:text>
527 </xsl:when>
528 <xsl:when test="ancestor::sect1[@id='ch-system-attr']">
529 <xsl:text>DIST_ROOT=$PKG_DEST make</xsl:text>
530 <xsl:call-template name="outputpkgdest">
531 <xsl:with-param name="outputstring"
532 select="substring-after($outputstring,'make')"/>
533 </xsl:call-template>
534 </xsl:when>
535 <xsl:otherwise>
536 <xsl:text>make DESTDIR=$PKG_DEST</xsl:text>
537 <xsl:call-template name="outputpkgdest">
538 <xsl:with-param
539 name="outputstring"
540 select="substring-after($outputstring,'make')"/>
541 </xsl:call-template>
542 </xsl:otherwise>
543 </xsl:choose>
544 </xsl:otherwise>
545 </xsl:choose>
546 </xsl:when>
547 <xsl:otherwise> <!-- no make in this string -->
548 <xsl:choose>
549 <xsl:when test="contains($outputstring,'&gt;/') and
550 not(contains(substring-before($outputstring,'&gt;/'),' /'))">
551 <xsl:value-of select="substring-before($outputstring,'&gt;/')"/>
552 <xsl:text>&gt;$PKG_DEST/</xsl:text>
553 <xsl:call-template name="outputpkgdest">
554 <xsl:with-param name="outputstring" select="substring-after($outputstring,'&gt;/')"/>
555 </xsl:call-template>
556 </xsl:when>
557 <xsl:when test="contains($outputstring,' /')">
558 <xsl:value-of select="substring-before($outputstring,' /')"/>
559 <xsl:text> $PKG_DEST/</xsl:text>
560 <xsl:call-template name="outputpkgdest">
561 <xsl:with-param name="outputstring" select="substring-after($outputstring,' /')"/>
562 </xsl:call-template>
563 </xsl:when>
564 <xsl:otherwise>
565 <xsl:value-of select="$outputstring"/>
566 <xsl:text>&#xA;</xsl:text>
567 </xsl:otherwise>
568 </xsl:choose>
569 </xsl:otherwise>
570 </xsl:choose>
571 </xsl:template>
572</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.