source: BLFS/xsl/process-install.xsl@ cd87e52

ablfs-more trunk
Last change on this file since cd87e52 was 9a89ba7, checked in by Pierre Labastie <pierre.labastie@…>, 14 months ago

ablfs: new pattern for config recognition

chgrp -v mail ... is found in mutt and shouldn't considered
an install command.

  • Property mode set to 100644
File size: 23.2 KB
RevLine 
[c048987]1<?xml version="1.0" encoding="ISO-8859-1"?>
[3930460]2<!DOCTYPE stylesheet [
[0974c32]3<!ENTITY detect-config
4 "contains(string($current-instr),'useradd') or
5 contains(string($current-instr),'groupadd') or
6 contains(string($current-instr),'usermod') or
7 contains(string($current-instr),'icon-cache') or
8 contains(string($current-instr),'desktop-database') or
9 contains(string($current-instr),'compile-schemas') or
10 contains(string($current-instr),'query-loaders') or
11 contains(string($current-instr),'pam.d') or
12 contains(string($current-instr),'/opt/rustc') or
13 contains(string($current-instr),'libQt5WebEngine') or
[426e40b]14 contains(string($current-instr),'desktop-file-edit') or
[22abf37]15 contains(string($current-instr),'.old') or
[d5413a9]16 contains(string($current-instr),'tracker-miner') or
[59a1e1a]17 contains(string($current-instr),'gtweak') or
[82ddba9]18 contains(string($current-instr),'query-immodules') or
[9a89ba7]19 contains(string($current-instr),'chgrp -v mail') or
[82ddba9]20 contains(string($current-instr),'gnome-control-center')">
[3930460]21]>
[c048987]22
23<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
24 version="1.0">
25
[7933ed7]26 <xsl:template name="process-install">
27 <xsl:param name="instruction-tree"/>
28 <xsl:param name="want-stats"/>
29 <xsl:param name="root-seen"/>
30 <xsl:param name="install-seen"/>
31 <xsl:param name="test-seen"/>
32 <xsl:param name="doc-seen"/>
[c048987]33
[8fc6a47]34<!-- Isolate the current instruction -->
35 <xsl:variable name="current-instr" select="$instruction-tree[1]"/>
[c048987]36
37 <xsl:choose>
[0a0b609]38<!--============================================================-->
[8fc6a47]39<!-- First, if we have an empty tree, close everything and exit -->
40 <xsl:when test="not($current-instr)">
41 <xsl:if test="$install-seen">
[c048987]42 <xsl:call-template name="end-install"/>
[8fc6a47]43 </xsl:if>
44 <xsl:if test="$root-seen">
[c048987]45 <xsl:call-template name="end-root"/>
46 </xsl:if>
[8fc6a47]47 <xsl:if test="$doc-seen and not($root-seen)">
48 <xsl:call-template name="end-doc">
49 <xsl:with-param name="want-stats" select="$want-stats"/>
50 </xsl:call-template>
51 </xsl:if>
52 <xsl:if test="$test-seen">
53 <xsl:call-template name="end-test">
54 <xsl:with-param name="want-stats" select="$want-stats"/>
55 </xsl:call-template>
56 </xsl:if>
[0a0b609]57 </xsl:when><!-- end empty tree -->
58<!--============================================================-->
[8fc6a47]59 <xsl:when test="$current-instr[@role='root' and @remap='test']">
60 <xsl:if test="$install-seen">
61 <xsl:call-template name="end-install"/>
62 </xsl:if>
63 <xsl:if test="$root-seen">
[c048987]64 <xsl:call-template name="end-root"/>
65 </xsl:if>
[8fc6a47]66 <xsl:if test="$doc-seen and not($root-seen)">
67 <xsl:call-template name="end-doc">
68 <xsl:with-param name="want-stats" select="$want-stats"/>
69 </xsl:call-template>
70 </xsl:if>
71 <xsl:if test="not($test-seen)">
72 <xsl:call-template name="begin-test">
73 <xsl:with-param name="want-stats" select="$want-stats"/>
74 </xsl:call-template>
75 </xsl:if>
76 <xsl:call-template name="begin-root"/>
[0a0b609]77<!-- We first apply mode="root" templates, and save the result in a variable -->
78 <xsl:variable name="processed-instr">
79 <xsl:apply-templates select="$current-instr" mode="root"/>
80 </xsl:variable>
81<!-- We then process as a test instruction -->
82 <xsl:call-template name="process-test">
83 <xsl:with-param name="test-instr" select="$processed-instr"/>
84 <xsl:with-param name="want-stats" select="$want-stats"/>
85 </xsl:call-template>
[8fc6a47]86 <xsl:call-template name="process-install">
87 <xsl:with-param
88 name="instruction-tree"
89 select="$instruction-tree[position()>1]"/>
90 <xsl:with-param name="want-stats" select="$want-stats"/>
91 <xsl:with-param name="root-seen" select="boolean(1)"/>
92 <xsl:with-param name="install-seen" select="boolean(0)"/>
93 <xsl:with-param name="test-seen" select="boolean(1)"/>
94 <xsl:with-param name="doc-seen" select="boolean(0)"/>
95 </xsl:call-template>
[0a0b609]96 </xsl:when><!-- end role="root" and remap="test" -->
97<!--============================================================-->
[8fc6a47]98 <xsl:when test="$current-instr[@role='root' and @remap='doc']">
99 <xsl:if test="$test-seen">
100 <xsl:call-template name="end-test">
101 <xsl:with-param name="want-stats" select="$want-stats"/>
102 </xsl:call-template>
103 </xsl:if>
104 <xsl:if test="$doc-seen and not($root-seen)">
105 <xsl:call-template name="end-doc">
106 <xsl:with-param name="want-stats" select="$want-stats"/>
107 </xsl:call-template>
108 </xsl:if>
109 <xsl:if test="not($root-seen)">
[c048987]110 <xsl:call-template name="begin-root"/>
111 </xsl:if>
[8fc6a47]112 <xsl:if test="not($install-seen)">
113 <xsl:call-template name="begin-install"/>
114 </xsl:if>
[0a0b609]115<!-- We first apply mode="install" templates, and save the result in a
116 variable -->
117 <xsl:variable name="processed-instr">
118 <xsl:apply-templates select="$current-instr" mode="install"/>
119 </xsl:variable>
120<!-- Then comment it out -->
121 <xsl:call-template name="output-comment-out">
122 <xsl:with-param name="out-string" select="$processed-instr"/>
123 </xsl:call-template>
[8fc6a47]124<!-- The above template ends with a commented line, so that if end-install
125 adds a closing single quote, it will not be seen. Add a CR to prevent
126 that -->
127 <xsl:text>
128</xsl:text>
129 <xsl:call-template name="process-install">
130 <xsl:with-param
131 name="instruction-tree"
132 select="$instruction-tree[position()>1]"/>
133 <xsl:with-param name="want-stats" select="$want-stats"/>
134 <xsl:with-param name="root-seen" select="boolean(1)"/>
135 <xsl:with-param name="install-seen" select="boolean(1)"/>
136 <xsl:with-param name="test-seen" select="boolean(0)"/>
137 <xsl:with-param name="doc-seen" select="boolean(1)"/>
138 </xsl:call-template>
[0a0b609]139 </xsl:when><!-- end role="root" and remap="doc" -->
140<!--============================================================-->
[8fc6a47]141 <xsl:when test="$current-instr[@role='root']">
[0a0b609]142<!-- We have two cases, depending on the content: either a config instruction,
[3930460]143 that we do not record with porg (first case below), or a true install
[0a0b609]144 instruction (otherwise below) -->
[8fc6a47]145 <xsl:choose>
[0a0b609]146<!--____________________________________________________________ -->
[3930460]147 <xsl:when test="&detect-config;">
[8fc6a47]148 <xsl:if test="$install-seen">
149 <xsl:call-template name="end-install"/>
150 </xsl:if>
151 <xsl:if test="$test-seen">
152 <xsl:call-template name="end-test">
153 <xsl:with-param name="want-stats" select="$want-stats"/>
154 </xsl:call-template>
155 </xsl:if>
156 <xsl:if test="$doc-seen and not($root-seen)">
157 <xsl:call-template name="end-doc">
158 <xsl:with-param name="want-stats" select="$want-stats"/>
159 </xsl:call-template>
160 </xsl:if>
161 <xsl:if test="not($root-seen)">
162 <xsl:call-template name="begin-root"/>
163 </xsl:if>
164 <xsl:apply-templates select="$current-instr" mode="root"/>
165 <xsl:call-template name="process-install">
166 <xsl:with-param
167 name="instruction-tree"
168 select="$instruction-tree[position()>1]"/>
169 <xsl:with-param name="want-stats" select="$want-stats"/>
170 <xsl:with-param name="root-seen" select="boolean(1)"/>
171 <xsl:with-param name="install-seen" select="boolean(0)"/>
172 <xsl:with-param name="test-seen" select="boolean(0)"/>
173 <xsl:with-param name="doc-seen" select="boolean(0)"/>
174 </xsl:call-template>
175 </xsl:when><!-- end config as root -->
[0a0b609]176<!--____________________________________________________________ -->
[8fc6a47]177 <xsl:otherwise><!-- we have a true install instruction -->
178 <xsl:if test="$test-seen">
179 <xsl:call-template name="end-test">
180 <xsl:with-param name="want-stats" select="$want-stats"/>
181 </xsl:call-template>
182 </xsl:if>
183 <xsl:if test="$doc-seen and not($root-seen)">
184 <xsl:call-template name="end-doc">
185 <xsl:with-param name="want-stats" select="$want-stats"/>
186 </xsl:call-template>
187 </xsl:if>
188 <xsl:if test="$want-stats and not($install-seen)">
189 <xsl:if test="$root-seen">
190 <xsl:call-template name="end-root"/>
191 </xsl:if>
192 <xsl:text>
193echo Time before install: ${SECONDS} >> $INFOLOG</xsl:text>
194 <xsl:apply-templates
195 select="$instruction-tree[@role='root']/userinput"
196 mode="destdir"/>
197 <xsl:text>
198
199echo Time after install: ${SECONDS} >> $INFOLOG
[59c4761]200echo Size after install: $(sudo du -skx --exclude home $BUILD_DIR) >> $INFOLOG
[8fc6a47]201</xsl:text>
202 <xsl:if test="$root-seen">
203 <xsl:call-template name="begin-root"/>
204 </xsl:if>
205 </xsl:if>
206 <xsl:if test="not($root-seen)">
207 <xsl:call-template name="begin-root"/>
208 </xsl:if>
209 <xsl:if test="not($install-seen)">
210 <xsl:call-template name="begin-install"/>
211 </xsl:if>
212 <xsl:apply-templates select="$current-instr" mode="install"/>
213 <xsl:call-template name="process-install">
214 <xsl:with-param
215 name="instruction-tree"
216 select="$instruction-tree[position()>1]"/>
217 <xsl:with-param name="want-stats" select="$want-stats"/>
218 <xsl:with-param name="root-seen" select="boolean(1)"/>
219 <xsl:with-param name="install-seen" select="boolean(1)"/>
220 <xsl:with-param name="test-seen" select="boolean(0)"/>
221 <xsl:with-param name="doc-seen" select="boolean(0)"/>
222 </xsl:call-template>
223 </xsl:otherwise><!-- end true install instruction -->
[0a0b609]224<!--____________________________________________________________ -->
[8fc6a47]225 </xsl:choose>
226 </xsl:when><!-- role="root" and no remap -->
[0a0b609]227<!--============================================================-->
[8fc6a47]228 <xsl:when test="$current-instr[@remap='test'] or
229 $current-instr/self::command">
230 <xsl:if test="$install-seen">
[c048987]231 <xsl:call-template name="end-install"/>
232 </xsl:if>
[8fc6a47]233 <xsl:if test="$root-seen">
[c048987]234 <xsl:call-template name="end-root"/>
235 </xsl:if>
[8fc6a47]236 <xsl:if test="$doc-seen and not($root-seen)">
237 <xsl:call-template name="end-doc">
238 <xsl:with-param name="want-stats" select="$want-stats"/>
239 </xsl:call-template>
240 </xsl:if>
241 <xsl:if test="not($test-seen)">
242 <xsl:if test="not($doc-seen)">
243 <xsl:call-template name="end-make">
244 <xsl:with-param name="want-stats" select="$want-stats"/>
245 </xsl:call-template>
[c048987]246 </xsl:if>
[8fc6a47]247 <xsl:call-template name="begin-test">
248 <xsl:with-param name="want-stats" select="$want-stats"/>
249 </xsl:call-template>
[c048987]250 </xsl:if>
[0a0b609]251<!-- We first apply normal templates, and save the result in a variable -->
252 <xsl:variable name="processed-instr">
253 <xsl:apply-templates select="$current-instr"/>
254 </xsl:variable>
255<!-- We then process as a test instruction -->
256 <xsl:call-template name="process-test">
257 <xsl:with-param name="test-instr" select="$processed-instr"/>
258 <xsl:with-param name="want-stats" select="$want-stats"/>
259 </xsl:call-template>
[8fc6a47]260 <xsl:call-template name="process-install">
261 <xsl:with-param
262 name="instruction-tree"
263 select="$instruction-tree[position()>1]"/>
264 <xsl:with-param name="want-stats" select="$want-stats"/>
265 <xsl:with-param name="root-seen" select="boolean(0)"/>
266 <xsl:with-param name="install-seen" select="boolean(0)"/>
267 <xsl:with-param name="test-seen" select="boolean(1)"/>
268 <xsl:with-param name="doc-seen" select="boolean(0)"/>
269 </xsl:call-template>
[0a0b609]270 </xsl:when><!-- end no role, remap=test -->
271<!--============================================================-->
[8fc6a47]272 <xsl:when test="$current-instr[@remap='doc']">
273 <xsl:if test="$install-seen">
274 <xsl:call-template name="end-install"/>
275 </xsl:if>
276 <xsl:if test="$root-seen">
277 <xsl:call-template name="end-root"/>
278 </xsl:if>
279 <xsl:if test="$test-seen">
280 <xsl:call-template name="end-test">
281 <xsl:with-param name="want-stats" select="$want-stats"/>
282 </xsl:call-template>
283 </xsl:if>
284 <xsl:if test="not($doc-seen) or $root-seen">
285 <xsl:if test="not($test-seen) and not($root-seen)">
286 <xsl:call-template name="end-make">
287 <xsl:with-param name="want-stats" select="$want-stats"/>
288 </xsl:call-template>
[c048987]289 </xsl:if>
[8fc6a47]290 <xsl:call-template name="begin-doc">
291 <xsl:with-param name="want-stats" select="$want-stats"/>
292 </xsl:call-template>
[c048987]293 </xsl:if>
[0a0b609]294<!-- We first apply normal templates, and save the result in a variable -->
295 <xsl:variable name="processed-instr">
296 <xsl:apply-templates select="$current-instr"/>
297 </xsl:variable>
298<!-- We then process as a doc instruction -->
299 <xsl:call-template name="process-doc">
300 <xsl:with-param name="doc-instr" select="$processed-instr"/>
301 <xsl:with-param name="want-stats" select="$want-stats"/>
302 </xsl:call-template>
[8fc6a47]303 <xsl:call-template name="process-install">
304 <xsl:with-param
305 name="instruction-tree"
306 select="$instruction-tree[position()>1]"/>
307 <xsl:with-param name="want-stats" select="$want-stats"/>
308 <xsl:with-param name="root-seen" select="boolean(0)"/>
309 <xsl:with-param name="install-seen" select="boolean(0)"/>
310 <xsl:with-param name="test-seen" select="boolean(0)"/>
311 <xsl:with-param name="doc-seen" select="boolean(1)"/>
312 </xsl:call-template>
313 </xsl:when><!-- no role, remap="doc" -->
[0a0b609]314<!--============================================================-->
[8fc6a47]315 <xsl:otherwise><!-- no role no remap -->
316 <xsl:if test="$install-seen">
[c048987]317 <xsl:call-template name="end-install"/>
[8fc6a47]318 </xsl:if>
319 <xsl:if test="$root-seen">
[c048987]320 <xsl:call-template name="end-root"/>
321 </xsl:if>
[8fc6a47]322 <xsl:if test="$doc-seen and not($root-seen)">
323 <xsl:call-template name="end-doc">
324 <xsl:with-param name="want-stats" select="$want-stats"/>
325 </xsl:call-template>
326 </xsl:if>
327 <xsl:if test="$test-seen">
328 <xsl:call-template name="end-test">
329 <xsl:with-param name="want-stats" select="$want-stats"/>
330 </xsl:call-template>
331 </xsl:if>
332 <xsl:apply-templates select="$current-instr"/>
333 <xsl:call-template name="process-install">
334 <xsl:with-param
335 name="instruction-tree"
336 select="$instruction-tree[position()>1]"/>
337 <xsl:with-param name="want-stats" select="$want-stats"/>
338 <xsl:with-param name="root-seen" select="boolean(0)"/>
339 <xsl:with-param name="install-seen" select="boolean(0)"/>
340 <xsl:with-param name="test-seen" select="boolean(0)"/>
341 <xsl:with-param name="doc-seen" select="boolean(0)"/>
342 </xsl:call-template>
343 </xsl:otherwise><!-- no role, no remap -->
[0a0b609]344<!--============================================================-->
[8fc6a47]345 </xsl:choose>
346 </xsl:template>
347
[0a0b609]348 <xsl:template match="userinput" mode="install">
[8fc6a47]349 <xsl:text>
350</xsl:text>
[0a0b609]351 <xsl:call-template name="output-install">
[8fc6a47]352 <xsl:with-param name="out-string" select="string()"/>
353 </xsl:call-template>
354 </xsl:template>
355
[0a0b609]356<!-- userinput templates for mode="root" and normal are in scripts.xsl -->
[8fc6a47]357
[0a0b609]358 <xsl:template name="process-test">
359 <xsl:param name="test-instr"/>
360 <xsl:param name="want-stats"/>
361 <xsl:choose>
362 <!-- the string may begin with a linefeed -->
363 <xsl:when test="substring($test-instr,1,1)='&#xA;'">
364 <xsl:text>
[8fc6a47]365</xsl:text>
[0a0b609]366 <xsl:call-template name="process-test">
367 <xsl:with-param name="test-instr"
368 select="substring-after($test-instr,'&#xA;')"/>
369 <xsl:with-param name="want-stats" select="$want-stats"/>
370 </xsl:call-template>
371 </xsl:when>
372 <xsl:when test="contains($test-instr,'&#xA;')">
373 <xsl:call-template name="process-test">
374 <xsl:with-param name="test-instr"
375 select="substring-before($test-instr,'&#xA;')"/>
376 <xsl:with-param name="want-stats" select="$want-stats"/>
377 </xsl:call-template>
378 <xsl:text>
379</xsl:text>
380 <xsl:call-template name="process-test">
381 <xsl:with-param name="test-instr"
382 select="substring-after($test-instr,'&#xA;')"/>
383 <xsl:with-param name="want-stats" select="$want-stats"/>
384 </xsl:call-template>
385 </xsl:when>
386 <xsl:otherwise>
387 <xsl:if test="not($want-stats)">
388 <xsl:text>#</xsl:text>
389 </xsl:if>
390 <xsl:choose>
391 <xsl:when test="contains($test-instr,'make')
392 and not(contains($test-instr,'make -k'))">
393 <xsl:copy-of select="substring-before($test-instr,'make')"/>
394 <xsl:text>make -k</xsl:text>
395 <xsl:copy-of select="substring-after($test-instr,'make')"/>
396 </xsl:when>
397 <xsl:otherwise>
398 <xsl:copy-of select="$test-instr"/>
399 </xsl:otherwise>
400 </xsl:choose>
401 <xsl:if test="substring($test-instr,
402 string-length($test-instr),
403 1)!='\'">
404 <xsl:if test="$want-stats">
405 <xsl:text> &gt;&gt; $TESTLOG 2>&amp;1</xsl:text>
406 </xsl:if>
407 <xsl:text> || true</xsl:text>
408 </xsl:if>
409 </xsl:otherwise>
410 </xsl:choose>
[8fc6a47]411 </xsl:template>
412
[0a0b609]413 <xsl:template name="process-doc">
414 <xsl:param name="doc-instr"/>
415 <xsl:param name="want-stats"/>
416 <xsl:choose>
417 <xsl:when test="$want-stats">
418 <xsl:copy-of select="$doc-instr"/>
419 </xsl:when>
420 <xsl:otherwise>
421 <xsl:call-template name="output-comment-out">
422 <xsl:with-param name="out-string" select="$doc-instr"/>
423 </xsl:call-template>
424 </xsl:otherwise>
425 </xsl:choose>
[8fc6a47]426 </xsl:template>
[c048987]427
[8fc6a47]428 <xsl:template name="output-comment-out">
[0a0b609]429<!-- Output instructions with each line commented out. -->
[8fc6a47]430 <xsl:param name="out-string"/>
431 <xsl:choose>
[0a0b609]432 <!-- the string may begin with a linefeed -->
433 <xsl:when test="substring($out-string,1,1)='&#xA;'">
434 <xsl:text>
435</xsl:text>
436 <xsl:call-template name="output-comment-out">
437 <xsl:with-param name="out-string"
438 select="substring-after($out-string,'&#xA;')"/>
439 </xsl:call-template>
440 </xsl:when>
[8fc6a47]441 <xsl:when test="contains($out-string,'&#xA;')">
[0a0b609]442 <xsl:text>#</xsl:text>
443 <xsl:copy-of select="substring-before($out-string,'&#xA;')"/>
[8fc6a47]444 <xsl:text>
445</xsl:text>
446 <xsl:call-template name="output-comment-out">
[0a0b609]447 <xsl:with-param name="out-string"
448 select="substring-after($out-string,'&#xA;')"/>
[8fc6a47]449 </xsl:call-template>
450 </xsl:when>
451 <xsl:otherwise>
[0a0b609]452 <xsl:text>#</xsl:text>
453 <xsl:copy-of select="$out-string"/>
[8fc6a47]454 </xsl:otherwise>
[c048987]455 </xsl:choose>
456 </xsl:template>
457
[8fc6a47]458 <xsl:template name="end-make">
459 <xsl:param name="want-stats"/>
460 <xsl:if test="$want-stats">
461 <xsl:text>
462
463echo Time after make: ${SECONDS} >> $INFOLOG
[59c4761]464echo Size after make: $(sudo du -skx --exclude home $BUILD_DIR) >> $INFOLOG</xsl:text>
[8fc6a47]465 </xsl:if>
466 </xsl:template>
467
468 <xsl:template name="begin-doc">
469 <xsl:param name="want-stats"/>
470 <xsl:if test="$want-stats">
471 <xsl:text>
472echo Time before doc: ${SECONDS} >> $INFOLOG
473</xsl:text>
474 </xsl:if>
475 </xsl:template>
476
477 <xsl:template name="begin-test">
478 <xsl:param name="want-stats"/>
479 <xsl:if test="$want-stats">
480 <xsl:text>
481echo Time before test: ${SECONDS} >> $INFOLOG
482</xsl:text>
483 </xsl:if>
484 </xsl:template>
485
[c048987]486 <xsl:template name="begin-root">
487 <xsl:if test="$sudo='y'">
[619b313]488 <xsl:text>
[610a5c4]489sudo -E sh -e &lt;&lt; ROOT_EOF
490PATH=$PATH:/usr/sbin</xsl:text>
[c048987]491 </xsl:if>
492 </xsl:template>
493
494 <xsl:template name="begin-install">
495 <xsl:if test="$wrap-install = 'y'">
[619b313]496 <xsl:text>
497if [ -r "$JH_PACK_INSTALL" ]; then
[c048987]498 source $JH_PACK_INSTALL
499 export -f wrapInstall
500 export -f packInstall
501fi
[619b313]502wrapInstall '</xsl:text>
[c048987]503 </xsl:if>
504 </xsl:template>
505
[8fc6a47]506 <xsl:template name="end-doc">
507 <xsl:param name="want-stats"/>
508 <xsl:if test="$want-stats">
509 <xsl:text>
510
511echo Time after doc: ${SECONDS} >> $INFOLOG
[59c4761]512echo Size after doc: $(sudo du -skx --exclude home $BUILD_DIR) >> $INFOLOG</xsl:text>
[8fc6a47]513 </xsl:if>
514 </xsl:template>
515
516 <xsl:template name="end-test">
517 <xsl:param name="want-stats"/>
518 <xsl:if test="$want-stats">
519 <xsl:text>
520
521echo Time after test: ${SECONDS} >> $INFOLOG
[59c4761]522echo Size after test: $(sudo du -skx --exclude home $BUILD_DIR) >> $INFOLOG</xsl:text>
[8fc6a47]523 </xsl:if>
524 </xsl:template>
525
[c048987]526 <xsl:template name="end-root">
527 <xsl:if test="$sudo='y'">
[619b313]528 <xsl:text>
529ROOT_EOF</xsl:text>
[c048987]530 </xsl:if>
531 </xsl:template>
532
533 <xsl:template name="end-install">
534 <xsl:if test="$del-la-files = 'y'">
535 <xsl:call-template name="output-root">
536 <xsl:with-param name="out-string" select="$la-files-instr"/>
537 </xsl:call-template>
538 </xsl:if>
539 <xsl:if test="$wrap-install = 'y'">
[619b313]540 <xsl:text>'&#xA;packInstall</xsl:text>
[c048987]541 </xsl:if>
542 </xsl:template>
543
544 <xsl:template name="output-install">
545 <xsl:param name="out-string" select="''"/>
546 <xsl:choose>
[619b313]547 <xsl:when test="starts-with($out-string, 'make ') or
548 contains($out-string,' make ') or
549 contains($out-string,'&#xA;make')">
550 <xsl:call-template name="output-install">
551 <xsl:with-param
552 name="out-string"
553 select="substring-before($out-string,'make ')"/>
554 </xsl:call-template>
555 <xsl:text>make -j1 </xsl:text>
556 <xsl:call-template name="output-install">
557 <xsl:with-param
558 name="out-string"
559 select="substring-after($out-string,'make ')"/>
560 </xsl:call-template>
561 </xsl:when>
[c048987]562 <xsl:when test="contains($out-string,string($APOS))
563 and $wrap-install = 'y'">
564 <xsl:call-template name="output-root">
565 <xsl:with-param
566 name="out-string"
567 select="substring-before($out-string,string($APOS))"/>
568 </xsl:call-template>
569 <xsl:text>'\''</xsl:text>
570 <xsl:call-template name="output-install">
571 <xsl:with-param name="out-string"
572 select="substring-after($out-string,string($APOS))"/>
573 </xsl:call-template>
574 </xsl:when>
575 <xsl:otherwise>
576 <xsl:call-template name="output-root">
[aeb8539]577 <xsl:with-param name="out-string" select="$out-string"/>
[c048987]578 </xsl:call-template>
579 </xsl:otherwise>
580 </xsl:choose>
581 </xsl:template>
582
583</xsl:stylesheet>
Note: See TracBrowser for help on using the repository browser.