source: LFS/lfs.xsl@ ebb631a

2.4 ablfs-more legacy trunk
Last change on this file since ebb631a was 00313dd, checked in by Pierre Labastie <pierre@…>, 9 years ago

Remove man pages in section 5 for attr, since they are already
installed by man-pages

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