source: LFS/lfs.xsl@ 65d7d46

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

adaptations to recent modifications in the systemd book and
merging of a change (rev 3750) in the ablfs branch

  • Property mode set to 100644
File size: 23.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>
[f0a31de]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 <xsl:template match="sect2">
[eed0929]146 <!--XML::Parser is on the same page as Perl. The present code is OK
147 except for PKG_DEST and PKGDIR, which would be the same as for Perl.
[8099885]148 so set them to valid values.
149 Since rev 10281, that is no more true. So comment out.
[eed0929]150 <xsl:if test="contains(string(./title),'XML::Parser')">
151 <xsl:text>PKGDIR=$(dirname $PKGDIR)/</xsl:text>
152 <xsl:copy-of select="substring-after(.//userinput[@remap='pre'], 'cd ')"/>
153 <xsl:text>
154PKG_DEST=$(dirname $PKGDIR)/000-xml-parser
155</xsl:text>
[8099885]156 </xsl:if>-->
[f0a31de]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>
[f0a31de]180 </xsl:if>
181 <xsl:if test="../@id = 'ch-system-glibc' and
[90f304c]182 @role='installation' and
183 $pkgmngt = 'y'">
[f0a31de]184 <xsl:text>mkdir -pv $PKG_DEST/usr/include/{rpc,rpcsvc}
[7072e1f]185</xsl:text>
[f0a31de]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'">
[560bef1]196<!-- these files are provided by the shadow package -->
[7072e1f]197 <xsl:text>rm -fv $PKG_DEST/usr/share/man/{man3/getspnam.3,man5/passwd.5}
[560bef1]198</xsl:text>
199 </xsl:if>
200<!-- Attr man/man2 pages are already installed by man-pages. As of
201 March 2013, they are the same pages. Check it sometimes... -->
202 <xsl:if test="../@id = 'ch-system-attr'">
203 <xsl:text>rm -fv $PKG_DEST/usr/share/man/man2/*
[7072e1f]204</xsl:text>
[f0a31de]205 </xsl:if>
206 <xsl:text>rm -fv $PKG_DEST/{,usr/}lib64
[7072e1f]207rm -fv $PKG_DEST/usr/{man,doc,info}
208for dir in $PKG_DEST/usr/share/man/man{1..8}; do
209 [[ -z $(ls $dir) ]] &amp;&amp; rmdir -v $dir
210done
211for dir in $PKG_DEST/usr/share/{doc,info,man}; do
212 [[ -z $(ls $dir) ]] &amp;&amp; rmdir -v $dir
213done
214for dir in $PKG_DEST/usr/{lib,bin,sbin,include}; do
215 [[ -z $(ls $dir) ]] &amp;&amp; rmdir -v $dir
216done
217for dir in $PKG_DEST/{boot,etc,lib,bin,sbin}; do
218 [[ -z $(ls $dir) ]] &amp;&amp; rmdir -v $dir
219done
220packInstall
221rm -rf $PKG_DEST
222</xsl:text>
[f0a31de]223 </xsl:if>
224 <xsl:if test="$testsuite='3' and
225 ../@id='ch-tools-glibc' and
226 @role='installation'">
227 <xsl:copy-of select="//userinput[@remap='locale-test']"/>
228 <xsl:text>&#xA;</xsl:text>
229 </xsl:if>
230 <xsl:if test="../@id='ch-system-glibc' and @role='installation'">
231 <xsl:choose>
232 <xsl:when test="$full-locale='y'">
233 <xsl:copy-of select="//userinput[@remap='locale-full']"/>
234 <xsl:text>&#xA;</xsl:text>
235 </xsl:when>
236 <xsl:otherwise>
237 <xsl:copy-of select="//userinput[@remap='locale-test']"/>
238 <xsl:text>&#xA;</xsl:text>
239 <xsl:if test="not(contains(string(//userinput[@remap='locale-test']),$lang)) and $lang!='C' and $lang!='POSIX'">
240 <xsl:text>if LOCALE=`grep "</xsl:text>
241 <xsl:value-of select="$lang"/>
242 <xsl:text>/" $PKGDIR/localedata/SUPPORTED`; then
[b339c94]243 CHARMAP=`echo $LOCALE | sed 's,[^/]*/\([^ ]*\) [\],\1,'`
244 INPUT=`echo $LOCALE | sed 's,[/.].*,,'`
245 LOCALE=`echo $LOCALE | sed 's,/.*,,'`
246 localedef -i $INPUT -f $CHARMAP $LOCALE
247fi
248</xsl:text>
[f0a31de]249 </xsl:if>
250 </xsl:otherwise>
251 </xsl:choose>
[c4cf6de]252 </xsl:if>
[f0a31de]253 <xsl:apply-templates
254 select=".//screen[
255 not(@role) or
256 @role != 'nodump'
257 ]/userinput[
258 not(@remap) or
259 @remap='adjust' or
260 @remap='test' and current()/../@id='ch-tools-dejagnu'
261 ]"/>
[557fe91]262 </xsl:template>
263
[f0a31de]264 <xsl:template match="sect1" mode="pkgmngt">
[7072e1f]265 <xsl:param name="dirname" select="chapter05"/>
266 <!-- The build order -->
[575bcf3]267 <xsl:param name="order" select="062"/>
[7072e1f]268<!-- The file names -->
269 <xsl:variable name="pi-file" select="processing-instruction('dbhtml')"/>
270 <xsl:variable name="pi-file-value" select="substring-after($pi-file,'filename=')"/>
271 <xsl:variable name="filename" select="substring-before(substring($pi-file-value,2),'.html')"/>
272 <!-- Creating dirs and files -->
[8099885]273 <xsl:if test="count(descendant::screen/userinput) &gt; 0 and
274 count(descendant::screen/userinput) &gt;
275 count(descendant::screen[@role='nodump'])">
276 <exsl:document href="{$dirname}/{$order}-{position()}-{$filename}"
277 method="text">
278 <xsl:text>#!/bin/bash
[7072e1f]279set +h
280set -e
281
282cd $PKGDIR
283</xsl:text>
[8099885]284 <xsl:apply-templates
285 select=".//screen[not(@role) or
286 @role != 'nodump']/userinput[@remap != 'adjust']"
[7072e1f]287 mode="pkgmngt"/>
[8099885]288 <xsl:if test="$dirname = 'chapter06'">
289 <xsl:text>packInstall
[7072e1f]290rm -rf $PKG_DEST
291</xsl:text>
[8099885]292 </xsl:if>
293 <xsl:apply-templates
294 select=".//screen[not(@role) or
295 @role != 'nodump'
296 ]/userinput[not(@remap) or
297 @remap='adjust'
[7072e1f]298 ]"
299 mode="pkgmngt"/>
[8099885]300 <xsl:text>
[7072e1f]301echo -e "\n\nTotalseconds: $SECONDS\n"
302exit
303</xsl:text>
[8099885]304 </exsl:document>
305 </xsl:if>
[557fe91]306 </xsl:template>
307
[7072e1f]308 <xsl:template match="userinput" mode="pkgmngt">
309 <xsl:apply-templates/>
310 <xsl:text>&#xA;</xsl:text>
311 </xsl:template>
312
313 <xsl:template match="userinput">
[3eb60fa]314 <xsl:choose>
[fd691b4]315 <!-- Copying the kernel config file -->
316 <xsl:when test="string() = 'make mrproper'">
317 <xsl:text>make mrproper&#xA;</xsl:text>
[7072e1f]318 <xsl:if test="ancestor::sect1[@id='ch-bootable-kernel']">
[bcfb3bf]319 <xsl:text>cp -v ../kernel-config .config&#xA;</xsl:text>
320 </xsl:if>
[92568bf]321 </xsl:when>
[7072e1f]322<!-- test instructions -->
323 <xsl:when test="@remap = 'test'">
[4afcedb]324 <xsl:choose>
325 <xsl:when test="$testsuite = '0'"/>
326 <xsl:when test="$testsuite = '1' and
327 not(ancestor::sect1[@id='ch-system-gcc']) and
328 not(ancestor::sect1[@id='ch-system-glibc']) and
[7072e1f]329 not(ancestor::sect1[@id='ch-system-gmp']) and
330 not(ancestor::sect1[@id='ch-system-mpfr']) and
[4afcedb]331 not(ancestor::sect1[@id='ch-system-binutils'])"/>
332 <xsl:when test="$testsuite = '2' and
333 ancestor::chapter[@id='chapter-temporary-tools']"/>
334 <xsl:otherwise>
335 <xsl:choose>
336 <xsl:when test="$bomb-testsuite = 'n'">
[7072e1f]337 <xsl:choose>
338 <!-- special case for glibc -->
339 <xsl:when test="contains(string(), 'glibc-check-log')">
340 <xsl:value-of
341 select="substring-before(string(),'2&gt;&amp;1')"/>
342 <xsl:text>&gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
343 </xsl:when>
[e40a68e]344 <!-- special case for procps-ng -->
345 <xsl:when test="contains(string(), 'pushd')">
346 <xsl:text>{ </xsl:text>
347 <xsl:apply-templates/>
348 <xsl:text>; } &gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
349 </xsl:when>
[7072e1f]350 <xsl:when test="contains(string(), 'make -k')">
351 <xsl:apply-templates/>
352 <xsl:text> &gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
353 </xsl:when>
354 <xsl:when test="contains(string(), 'make')">
355 <xsl:value-of select="substring-before(string(),'make')"/>
356 <xsl:text>make -k</xsl:text>
357 <xsl:value-of select="substring-after(string(),'make')"/>
358 <xsl:text> &gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
359 </xsl:when>
360 <xsl:otherwise>
361 <xsl:apply-templates/>
362 <xsl:if test="not(contains(string(), '&gt;&gt;'))">
363 <xsl:text> &gt;&gt; $TEST_LOG 2&gt;&amp;1</xsl:text>
364 </xsl:if>
365 <xsl:text>&#xA;</xsl:text>
366 </xsl:otherwise>
367 </xsl:choose>
[4afcedb]368 </xsl:when>
369 <xsl:otherwise>
[7072e1f]370 <!-- bomb-testsuite != 'n'-->
371 <xsl:choose>
372 <!-- special case for glibc -->
373 <xsl:when test="contains(string(), 'glibc-check-log')">
374 <xsl:value-of
375 select="substring-before(string(),'2&gt;&amp;1')"/>
[2c9a16b]376 <xsl:text>&gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
[7072e1f]377 </xsl:when>
[e40a68e]378 <!-- special case for gmp -->
[f663589]379 <xsl:when test="contains(string(), 'tee gmp-check-log')">
380 <xsl:text>(</xsl:text>
381 <xsl:apply-templates/>
382 <xsl:text>&gt;&gt; $TEST_LOG 2&gt;&amp;1 &amp;&amp; exit $PIPESTATUS)&#xA;</xsl:text>
383 </xsl:when>
[e40a68e]384 <!-- special case for procps-ng -->
385 <xsl:when test="contains(string(), 'pushd')">
386 <xsl:text>{ </xsl:text>
387 <xsl:apply-templates/>
388 <xsl:text>; } &gt;&gt; $TEST_LOG 2&gt;&amp;1&#xA;</xsl:text>
389 </xsl:when>
[2c9a16b]390 <xsl:when test="contains(string(), 'make -k')">
391 <xsl:apply-templates/>
392 <xsl:text> &gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
393 </xsl:when>
[7072e1f]394 <xsl:otherwise>
395 <xsl:apply-templates/>
396 <xsl:if test="not(contains(string(), '&gt;&gt;'))">
397 <xsl:text> &gt;&gt; $TEST_LOG 2&gt;&amp;1</xsl:text>
398 </xsl:if>
399 <xsl:text>&#xA;</xsl:text>
400 </xsl:otherwise>
401 </xsl:choose>
[4afcedb]402 </xsl:otherwise>
403 </xsl:choose>
404 </xsl:otherwise>
405 </xsl:choose>
406 </xsl:when>
[7072e1f]407<!-- End of test instructions -->
[fd691b4]408 <!-- Don't stop on strip run -->
409 <xsl:when test="contains(string(),'strip ')">
[3eb60fa]410 <xsl:apply-templates/>
[fd691b4]411 <xsl:text> || true&#xA;</xsl:text>
[1f025ca]412 </xsl:when>
[7072e1f]413<!-- Package management -->
414<!-- Add $PKG_DEST to installation commands -->
415 <xsl:when test="@remap='install' and
416 not(ancestor::chapter[
417 @id='chapter-temporary-tools'
418 ])">
419 <xsl:choose>
420 <xsl:when test="$pkgmngt='n'">
421 <xsl:choose>
422 <xsl:when test="contains(string(),'firmware,udev')">
423 <xsl:text>if [[ ! -d /lib/udev/devices ]] ; then&#xA;</xsl:text>
424 <xsl:apply-templates/>
425 <xsl:text>&#xA;fi&#xA;</xsl:text>
426 </xsl:when>
427 <xsl:otherwise>
428 <xsl:apply-templates/>
429 <xsl:text>&#xA;</xsl:text>
430 </xsl:otherwise>
431 </xsl:choose>
432 </xsl:when>
433 <xsl:otherwise><!--pkgmngt = 'y'-->
434 <xsl:choose>
435 <xsl:when test="./literal">
436 <xsl:call-template name="outputpkgdest">
[560bef1]437 <xsl:with-param name="outputstring" select="text()[1]"/>
[7072e1f]438 </xsl:call-template>
439 <xsl:apply-templates select="literal"/>
440 <xsl:call-template name="outputpkgdest">
[560bef1]441 <xsl:with-param name="outputstring" select="text()[2]"/>
[7072e1f]442 </xsl:call-template>
443 </xsl:when>
444 <xsl:otherwise>
445 <xsl:call-template name="outputpkgdest">
446 <xsl:with-param name="outputstring" select="string()"/>
447 </xsl:call-template>
448 </xsl:otherwise>
449 </xsl:choose>
450 </xsl:otherwise>
451 </xsl:choose>
452 </xsl:when>
453 <!-- End addition for package management -->
[fd691b4]454 <!-- The rest of commands -->
[1f025ca]455 <xsl:otherwise>
456 <xsl:apply-templates/>
[fd691b4]457 <xsl:text>&#xA;</xsl:text>
[1f025ca]458 </xsl:otherwise>
459 </xsl:choose>
460 </xsl:template>
[7072e1f]461
[557fe91]462 <xsl:template match="replaceable">
[a41ce58]463 <xsl:choose>
[2a54650]464 <xsl:when test="ancestor::sect1[@id='ch-system-glibc']">
[877cc6a]465 <xsl:value-of select="$timezone"/>
[2a54650]466 </xsl:when>
[a41ce58]467 <xsl:when test="ancestor::sect1[@id='ch-system-groff']">
[877cc6a]468 <xsl:value-of select="$page"/>
[a41ce58]469 </xsl:when>
[81a7fb8]470 <xsl:when test="contains(string(.),'&lt;ll&gt;_&lt;CC&gt;')">
471 <xsl:value-of select="$lang"/>
472 </xsl:when>
[a41ce58]473 <xsl:otherwise>
474 <xsl:text>**EDITME</xsl:text>
475 <xsl:apply-templates/>
476 <xsl:text>EDITME**</xsl:text>
477 </xsl:otherwise>
478 </xsl:choose>
[557fe91]479 </xsl:template>
[7072e1f]480
481 <xsl:template name="outputpkgdest">
482 <xsl:param name="outputstring" select="foo"/>
483 <xsl:choose>
484 <xsl:when test="contains($outputstring,'make ')">
485 <xsl:choose>
486 <xsl:when test="not(starts-with($outputstring,'make'))">
487 <xsl:call-template name="outputpkgdest">
488 <xsl:with-param name="outputstring"
489 select="substring-before($outputstring,'make')"/>
490 </xsl:call-template>
491 <xsl:call-template name="outputpkgdest">
492 <xsl:with-param
493 name="outputstring"
494 select="substring-after($outputstring,
495 substring-before($outputstring,'make'))"/>
496 </xsl:call-template>
497 </xsl:when>
498 <xsl:otherwise>
499 <xsl:choose>
500<!-- special cases (no DESTDIR) here -->
501 <xsl:when test="ancestor::sect1[@id='ch-system-glibc']">
502 <xsl:text>make install_root=$PKG_DEST -j1</xsl:text>
503 <xsl:value-of
504 select="substring-before(substring-after(string(),'make'),
505 'install')"/>
506 <xsl:text>install&#xA;</xsl:text>
507 </xsl:when>
508 <xsl:when test="ancestor::sect1[@id='ch-system-bzip2']">
509 <xsl:text>make PREFIX=$PKG_DEST/usr install&#xA;</xsl:text>
510 </xsl:when>
511 <xsl:when test="ancestor::sect1[@id='ch-system-sysklogd']">
512 <xsl:text>make BINDIR=$PKG_DEST/sbin prefix=$PKG_DEST install&#xA;</xsl:text>
513 </xsl:when>
514 <xsl:when test="ancestor::sect1[@id='ch-system-iproute2']">
515 <xsl:text>make DESTDIR=$PKG_DEST</xsl:text>
516 <xsl:value-of
517 select="substring-before(substring-after(string(),'DESTDIR='),
518 'install')"/>
519 <xsl:text>install&#xA;</xsl:text>
520 </xsl:when>
521 <xsl:when test="ancestor::sect1[@id='ch-system-sysvinit']">
522 <xsl:text>make ROOT=$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-bootable-kernel']">
529 <xsl:text>make INSTALL_MOD_PATH=$PKG_DEST</xsl:text>
530 <xsl:value-of
531 select="substring-before(substring-after(string(),'make'),
532 'install')"/>
533 <xsl:text>install&#xA;</xsl:text>
534 </xsl:when>
[560bef1]535 <xsl:when test="ancestor::sect1[@id='ch-system-attr']">
536 <xsl:text>DIST_ROOT=$PKG_DEST make</xsl:text>
537 <xsl:call-template name="outputpkgdest">
538 <xsl:with-param name="outputstring"
539 select="substring-after($outputstring,'make')"/>
540 </xsl:call-template>
541 </xsl:when>
[7072e1f]542 <xsl:otherwise>
[560bef1]543 <xsl:text>make DESTDIR=$PKG_DEST</xsl:text>
544 <xsl:call-template name="outputpkgdest">>
545 <xsl:with-param
[7072e1f]546 name="outputstring"
547 select="substring-after($outputstring,'make')"/>
[560bef1]548 </xsl:call-template>
[7072e1f]549 </xsl:otherwise>
550 </xsl:choose>
551 </xsl:otherwise>
552 </xsl:choose>
553 </xsl:when>
554 <xsl:otherwise> <!-- no make in this string -->
555 <xsl:choose>
556 <xsl:when test="contains($outputstring,'&gt;/') and
557 not(contains(substring-before($outputstring,'&gt;/'),' /'))">
558 <xsl:value-of select="substring-before($outputstring,'&gt;/')"/>
559 <xsl:text>&gt;$PKG_DEST/</xsl:text>
560 <xsl:call-template name="outputpkgdest">
561 <xsl:with-param name="outputstring" select="substring-after($outputstring,'&gt;/')"/>
562 </xsl:call-template>
563 </xsl:when>
564 <xsl:when test="contains($outputstring,' /')">
565 <xsl:value-of select="substring-before($outputstring,' /')"/>
566 <xsl:text> $PKG_DEST/</xsl:text>
567 <xsl:call-template name="outputpkgdest">
568 <xsl:with-param name="outputstring" select="substring-after($outputstring,' /')"/>
569 </xsl:call-template>
570 </xsl:when>
571 <xsl:otherwise>
572 <xsl:value-of select="$outputstring"/>
573 <xsl:text>&#xA;</xsl:text>
574 </xsl:otherwise>
575 </xsl:choose>
576 </xsl:otherwise>
577 </xsl:choose>
578 </xsl:template>
[557fe91]579</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.