source: LFS/lfs.xsl@ d7c07e0

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

The systemd tests have to be run after install

  • Property mode set to 100644
File size: 24.8 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') and
158 not(current()/../@id='ch-system-systemd')]"/>
159 <xsl:if
160 test="ancestor::chapter[@id != 'chapter-temporary-tools'] and
161 $pkgmngt = 'y' and
162 descendant::screen[not(@role) or
163 @role != 'nodump']/userinput[
164 @remap='install']">
165 <xsl:text>mkdir -pv $PKG_DEST/{boot,etc,lib,bin,sbin}
166mkdir -pv $PKG_DEST/usr/{lib,bin,sbin,include}
167mkdir -pv $PKG_DEST/usr/share/{doc,info,man}
168mkdir -pv $PKG_DEST/usr/share/man/man{1..8}
169ln -sv share/{man,doc,info} $PKG_DEST/usr
170case $(uname -m) in
171 x86_64) ln -sv lib $PKG_DEST/lib64 &amp;&amp; ln -sv lib $PKG_DEST/usr/lib64 ;;
172esac
173</xsl:text>
174 </xsl:if>
175 <xsl:if test="../@id = 'ch-system-glibc' and
176 @role='installation' and
177 $pkgmngt = 'y'">
178 <xsl:text>mkdir -pv $PKG_DEST/usr/include/{rpc,rpcsvc}
179</xsl:text>
180 </xsl:if>
181 <xsl:apply-templates
182 select=".//screen[not(@role) or
183 @role != 'nodump']/userinput[@remap = 'install']"/>
184 <xsl:if test="ancestor::chapter[@id != 'chapter-temporary-tools'] and
185 $pkgmngt = 'y' and
186 descendant::screen[not(@role) or
187 @role != 'nodump']/userinput[
188 @remap='install']">
189 <xsl:if test="../@id = 'ch-system-man-pages'">
190<!-- these files are provided by the shadow package -->
191 <xsl:text>rm -fv $PKG_DEST/usr/share/man/{man3/getspnam.3,man5/passwd.5}
192</xsl:text>
193 </xsl:if>
194<!-- Attr man/man2 pages are already installed by man-pages. As of
195 March 2013, they are the same pages. Check it sometimes... -->
196 <xsl:if test="../@id = 'ch-system-attr'">
197 <xsl:text>rm -fv $PKG_DEST/usr/share/man/man2/*
198</xsl:text>
199 </xsl:if>
200<!-- nologin is installed by util-linux. remove it from shadow -->
201 <xsl:if test="../@id = 'ch-system-shadow'">
202 <xsl:text>rm -fv $PKG_DEST/usr/share/man/man8/nologin.8
203rm -fv $PKG_DEST/sbin/nologin
204</xsl:text>
205 </xsl:if>
206 <xsl:text>rm -fv $PKG_DEST/{,usr/}lib64
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>
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
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>
249 </xsl:if>
250 </xsl:otherwise>
251 </xsl:choose>
252 </xsl:if>
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' or
261 @remap='test' and current()/../@id='ch-system-systemd'
262 ]"/>
263 </xsl:template>
264
265 <xsl:template match="sect1" mode="pkgmngt">
266 <xsl:param name="dirname" select="chapter05"/>
267 <!-- The build order -->
268 <xsl:param name="order" select="062"/>
269<!-- The file names -->
270 <xsl:variable name="pi-file" select="processing-instruction('dbhtml')"/>
271 <xsl:variable name="pi-file-value" select="substring-after($pi-file,'filename=')"/>
272 <xsl:variable name="filename" select="substring-before(substring($pi-file-value,2),'.html')"/>
273 <!-- Creating dirs and files -->
274 <xsl:if test="count(descendant::screen/userinput) &gt; 0 and
275 count(descendant::screen/userinput) &gt;
276 count(descendant::screen[@role='nodump'])">
277 <exsl:document href="{$dirname}/{$order}-{position()}-{$filename}"
278 method="text">
279 <xsl:text>#!/bin/bash
280set +h
281set -e
282
283cd $PKGDIR
284</xsl:text>
285 <xsl:apply-templates
286 select=".//screen[not(@role) or
287 @role != 'nodump']/userinput[@remap != 'adjust']"
288 mode="pkgmngt"/>
289 <xsl:if test="$dirname = 'chapter06'">
290 <xsl:text>packInstall
291rm -rf $PKG_DEST
292</xsl:text>
293 </xsl:if>
294 <xsl:apply-templates
295 select=".//screen[not(@role) or
296 @role != 'nodump'
297 ]/userinput[not(@remap) or
298 @remap='adjust'
299 ]"
300 mode="pkgmngt"/>
301 <xsl:text>
302echo -e "\n\nTotalseconds: $SECONDS\n"
303exit
304</xsl:text>
305 </exsl:document>
306 </xsl:if>
307 </xsl:template>
308
309 <xsl:template match="userinput" mode="pkgmngt">
310 <xsl:apply-templates/>
311 <xsl:text>&#xA;</xsl:text>
312 </xsl:template>
313
314 <xsl:template match="userinput">
315 <xsl:choose>
316 <!-- Copying the kernel config file -->
317 <xsl:when test="string() = 'make mrproper'">
318 <xsl:text>make mrproper&#xA;</xsl:text>
319 <xsl:if test="ancestor::sect1[@id='ch-bootable-kernel']">
320 <xsl:text>cp -v ../kernel-config .config&#xA;</xsl:text>
321 </xsl:if>
322 </xsl:when>
323<!-- test instructions -->
324 <xsl:when test="@remap = 'test'">
325 <xsl:choose>
326 <xsl:when test="$testsuite = '0'"/>
327 <xsl:when test="$testsuite = '1' and
328 not(ancestor::sect1[@id='ch-system-gcc']) and
329 not(ancestor::sect1[@id='ch-system-glibc']) and
330 not(ancestor::sect1[@id='ch-system-gmp']) and
331 not(ancestor::sect1[@id='ch-system-mpfr']) and
332 not(ancestor::sect1[@id='ch-system-binutils'])"/>
333 <xsl:when test="$testsuite = '2' and
334 ancestor::chapter[@id='chapter-temporary-tools']"/>
335 <xsl:otherwise>
336 <xsl:choose>
337 <xsl:when test="$bomb-testsuite = 'n'">
338 <xsl:choose>
339 <!-- special case for glibc -->
340 <xsl:when test="contains(string(), 'glibc-check-log')">
341 <xsl:value-of
342 select="substring-before(string(),'2&gt;&amp;1')"/>
343 <xsl:text>&gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
344 </xsl:when>
345 <!-- special case for procps-ng -->
346 <xsl:when test="contains(string(), 'pushd')">
347 <xsl:text>{ </xsl:text>
348 <xsl:apply-templates/>
349 <xsl:text>; } &gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
350 </xsl:when>
351 <xsl:when test="contains(string(), 'make -k')">
352 <xsl:apply-templates/>
353 <xsl:text> &gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
354 </xsl:when>
355 <xsl:when test="contains(string(), 'make')">
356 <xsl:value-of select="substring-before(string(),'make')"/>
357 <xsl:text>make -k</xsl:text>
358 <xsl:value-of select="substring-after(string(),'make')"/>
359 <xsl:text> &gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
360 </xsl:when>
361 <xsl:otherwise>
362 <xsl:apply-templates/>
363 <xsl:if test="not(contains(string(), '&gt;&gt;'))">
364 <xsl:text> &gt;&gt; $TEST_LOG 2&gt;&amp;1</xsl:text>
365 </xsl:if>
366 <xsl:text>&#xA;</xsl:text>
367 </xsl:otherwise>
368 </xsl:choose>
369 </xsl:when>
370 <xsl:otherwise>
371 <!-- bomb-testsuite != 'n'-->
372 <xsl:choose>
373 <!-- special case for glibc -->
374 <xsl:when test="contains(string(), 'glibc-check-log')">
375 <xsl:value-of
376 select="substring-before(string(),'2&gt;&amp;1')"/>
377 <xsl:text>&gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
378 </xsl:when>
379 <!-- special case for gmp -->
380 <xsl:when test="contains(string(), 'tee gmp-check-log')">
381 <xsl:text>(</xsl:text>
382 <xsl:apply-templates/>
383 <xsl:text>&gt;&gt; $TEST_LOG 2&gt;&amp;1 &amp;&amp; exit $PIPESTATUS)&#xA;</xsl:text>
384 </xsl:when>
385 <!-- special case for procps-ng -->
386 <xsl:when test="contains(string(), 'pushd')">
387 <xsl:text>{ </xsl:text>
388 <xsl:apply-templates/>
389 <xsl:text>; } &gt;&gt; $TEST_LOG 2&gt;&amp;1&#xA;</xsl:text>
390 </xsl:when>
391 <xsl:when test="contains(string(), 'make -k')">
392 <xsl:apply-templates/>
393 <xsl:text> &gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
394 </xsl:when>
395 <xsl:otherwise>
396 <xsl:apply-templates/>
397 <xsl:if test="not(contains(string(), '&gt;&gt;'))">
398 <xsl:text> &gt;&gt; $TEST_LOG 2&gt;&amp;1</xsl:text>
399 </xsl:if>
400 <xsl:text>&#xA;</xsl:text>
401 </xsl:otherwise>
402 </xsl:choose>
403 </xsl:otherwise>
404 </xsl:choose>
405 </xsl:otherwise>
406 </xsl:choose>
407 </xsl:when>
408<!-- End of test instructions -->
409 <!-- Don't stop on strip run -->
410 <xsl:when test="contains(string(),'strip ')">
411 <xsl:apply-templates/>
412 <xsl:text> || true&#xA;</xsl:text>
413 </xsl:when>
414<!-- Package management -->
415<!-- Add $PKG_DEST to installation commands -->
416 <xsl:when test="@remap='install' and
417 not(ancestor::chapter[
418 @id='chapter-temporary-tools'
419 ])">
420 <xsl:choose>
421 <xsl:when test="$pkgmngt='n'">
422 <xsl:choose>
423 <xsl:when test="contains(string(),'firmware,udev')">
424 <xsl:text>if [[ ! -d /lib/udev/devices ]] ; then&#xA;</xsl:text>
425 <xsl:apply-templates/>
426 <xsl:text>&#xA;fi&#xA;</xsl:text>
427 </xsl:when>
428 <xsl:otherwise>
429 <xsl:apply-templates/>
430 <xsl:text>&#xA;</xsl:text>
431 </xsl:otherwise>
432 </xsl:choose>
433 </xsl:when>
434 <xsl:otherwise><!--pkgmngt = 'y'-->
435 <xsl:choose>
436 <xsl:when test="./literal">
437 <xsl:call-template name="outputpkgdest">
438 <xsl:with-param name="outputstring" select="text()[1]"/>
439 </xsl:call-template>
440 <xsl:apply-templates select="literal"/>
441 <xsl:call-template name="outputpkgdest">
442 <xsl:with-param name="outputstring" select="text()[2]"/>
443 </xsl:call-template>
444 </xsl:when>
445 <xsl:otherwise>
446 <xsl:call-template name="outputpkgdest">
447 <xsl:with-param name="outputstring" select="string()"/>
448 </xsl:call-template>
449 </xsl:otherwise>
450 </xsl:choose>
451 </xsl:otherwise>
452 </xsl:choose>
453 </xsl:when>
454 <!-- if package management, we should make an independant package for
455 tzdata. -->
456 <xsl:when test="contains(string(),'tzdata') and $pkgmngt='y'">
457 <xsl:text>
458OLD_PKG_DEST=$PKG_DEST
459OLD_PKGDIR=$PKGDIR
460PKG_DEST=$(dirname $OLD_PKG_DEST)/001-tzdata
461PKGDIR=$(dirname $PKGDIR)/tzdata-</xsl:text>
462 <xsl:copy-of select="substring-before(
463 substring-after(string(),'tzdata'),
464 '.tar')"/>
465 <xsl:text>
466</xsl:text>
467 <xsl:copy-of select="substring-before(string(),'ZONEINFO=')"/>
468 <xsl:text>ZONEINFO=$PKG_DEST</xsl:text>
469 <xsl:copy-of select="substring-after(string(),'ZONEINFO=')"/>
470 <xsl:text>
471packInstall
472rm -rf $PKG_DEST
473PKG_DEST=$OLD_PKG_DEST
474unset OLD_PKG_DEST
475PKGDIR=$OLD_PKGDIR
476unset OLD_PKGDIR
477</xsl:text>
478 </xsl:when><!-- addition for tzdata + package management -->
479 <!-- End addition for package management -->
480 <!-- The rest of commands -->
481 <xsl:otherwise>
482 <xsl:apply-templates/>
483 <xsl:text>&#xA;</xsl:text>
484 </xsl:otherwise>
485 </xsl:choose>
486 </xsl:template>
487
488 <xsl:template match="replaceable">
489 <xsl:choose>
490 <xsl:when test="ancestor::sect1[@id='ch-system-glibc']">
491 <xsl:value-of select="$timezone"/>
492 </xsl:when>
493 <xsl:when test="ancestor::sect1[@id='ch-system-groff']">
494 <xsl:value-of select="$page"/>
495 </xsl:when>
496 <xsl:when test="contains(string(.),'&lt;ll&gt;_&lt;CC&gt;')">
497 <xsl:value-of select="$lang"/>
498 </xsl:when>
499 <xsl:otherwise>
500 <xsl:text>**EDITME</xsl:text>
501 <xsl:apply-templates/>
502 <xsl:text>EDITME**</xsl:text>
503 </xsl:otherwise>
504 </xsl:choose>
505 </xsl:template>
506
507 <xsl:template name="outputpkgdest">
508 <xsl:param name="outputstring" select="foo"/>
509 <xsl:choose>
510 <xsl:when test="contains($outputstring,'make ')">
511 <xsl:choose>
512 <xsl:when test="not(starts-with($outputstring,'make'))">
513 <xsl:call-template name="outputpkgdest">
514 <xsl:with-param name="outputstring"
515 select="substring-before($outputstring,'make')"/>
516 </xsl:call-template>
517 <xsl:call-template name="outputpkgdest">
518 <xsl:with-param
519 name="outputstring"
520 select="substring-after($outputstring,
521 substring-before($outputstring,'make'))"/>
522 </xsl:call-template>
523 </xsl:when>
524 <xsl:otherwise>
525 <xsl:choose>
526<!-- special cases (no DESTDIR) here -->
527 <xsl:when test="ancestor::sect1[@id='ch-system-glibc']">
528 <xsl:text>make install_root=$PKG_DEST -j1</xsl:text>
529 <xsl:value-of
530 select="substring-before(substring-after(string(),'make'),
531 'install')"/>
532 <xsl:text>install&#xA;</xsl:text>
533 </xsl:when>
534 <xsl:when test="ancestor::sect1[@id='ch-system-bzip2']">
535 <xsl:text>make PREFIX=$PKG_DEST/usr install&#xA;</xsl:text>
536 </xsl:when>
537 <xsl:when test="ancestor::sect1[@id='ch-system-sysklogd']">
538 <xsl:text>make BINDIR=$PKG_DEST/sbin prefix=$PKG_DEST install&#xA;</xsl:text>
539 </xsl:when>
540 <xsl:when test="ancestor::sect1[@id='ch-system-iproute2']">
541 <xsl:text>make DESTDIR=$PKG_DEST DOCDIR=</xsl:text>
542 <xsl:value-of
543 select="substring-before(substring-after(string(),'DOCDIR='),
544 'install')"/>
545 <xsl:text>install&#xA;</xsl:text>
546 </xsl:when>
547 <xsl:when test="ancestor::sect1[@id='ch-system-sysvinit']">
548 <xsl:text>make ROOT=$PKG_DEST</xsl:text>
549 <xsl:value-of
550 select="substring-before(substring-after(string(),'make'),
551 'install')"/>
552 <xsl:text>install&#xA;</xsl:text>
553 </xsl:when>
554 <xsl:when test="ancestor::sect1[@id='ch-bootable-kernel']">
555 <xsl:text>make INSTALL_MOD_PATH=$PKG_DEST</xsl:text>
556 <xsl:value-of
557 select="substring-before(substring-after(string(),'make'),
558 'install')"/>
559 <xsl:text>install&#xA;</xsl:text>
560 </xsl:when>
561 <xsl:when test="ancestor::sect1[@id='ch-system-attr']">
562 <xsl:text>DIST_ROOT=$PKG_DEST make</xsl:text>
563 <xsl:call-template name="outputpkgdest">
564 <xsl:with-param name="outputstring"
565 select="substring-after($outputstring,'make')"/>
566 </xsl:call-template>
567 </xsl:when>
568 <xsl:otherwise>
569 <xsl:text>make DESTDIR=$PKG_DEST</xsl:text>
570 <xsl:call-template name="outputpkgdest">
571 <xsl:with-param
572 name="outputstring"
573 select="substring-after($outputstring,'make')"/>
574 </xsl:call-template>
575 </xsl:otherwise>
576 </xsl:choose>
577 </xsl:otherwise>
578 </xsl:choose>
579 </xsl:when>
580 <xsl:otherwise> <!-- no make in this string -->
581 <xsl:choose>
582 <xsl:when test="contains($outputstring,'&gt;/') and
583 not(contains(substring-before($outputstring,'&gt;/'),' /'))">
584 <xsl:value-of select="substring-before($outputstring,'&gt;/')"/>
585 <xsl:text>&gt;$PKG_DEST/</xsl:text>
586 <xsl:call-template name="outputpkgdest">
587 <xsl:with-param name="outputstring" select="substring-after($outputstring,'&gt;/')"/>
588 </xsl:call-template>
589 </xsl:when>
590 <xsl:when test="contains($outputstring,' /')">
591 <xsl:value-of select="substring-before($outputstring,' /')"/>
592 <xsl:text> $PKG_DEST/</xsl:text>
593 <xsl:call-template name="outputpkgdest">
594 <xsl:with-param name="outputstring" select="substring-after($outputstring,' /')"/>
595 </xsl:call-template>
596 </xsl:when>
597 <xsl:otherwise>
598 <xsl:value-of select="$outputstring"/>
599 <xsl:text>&#xA;</xsl:text>
600 </xsl:otherwise>
601 </xsl:choose>
602 </xsl:otherwise>
603 </xsl:choose>
604 </xsl:template>
605</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.