source: LFS/lfs.xsl@ 930b742

ablfs
Last change on this file since 930b742 was 930b742, checked in by Pierre Labastie <pierre@…>, 12 years ago

Merge trunk r3660

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