Changeset cfaeeb4 for CLFS2


Ignore:
Timestamp:
08/05/2006 06:23:46 PM (18 years ago)
Author:
Manuel Canales Esparcia <manuel@…>
Branches:
2.3, 2.3.x, 2.4, ablfs, ablfs-more, legacy, new_features, trunk
Children:
2dd88c4
Parents:
963fdae
Message:

Revised CLFS2 XSL code.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • CLFS2/clfs2.xsl

    r963fdae rcfaeeb4  
    1212    version="1.0">
    1313
    14 <!-- XSLT stylesheet to create shell scripts from CLFS books. -->
    15 
    16   <!-- Build method used -->
    17   <xsl:param name="method" select="chroot"/>
     14<!-- XSLT stylesheet to create shell scripts from CLFS2 books. -->
    1815
    1916  <!-- Compile the keymap into the kernel? -->
    2017  <xsl:param name="keymap" select="none"/>
    21 
    22   <!-- Run test suites?
    23        0 = none
    24        1 = only Glibc, GCC and Binutils testsuites
    25        2 = all testsuites
    26        3 = alias to 2 -->
    27   <xsl:param name="testsuite" select="0"/>
    2818
    2919  <!-- Install vim-lang package? -->
     
    4838                      ../@id='chapter-getting-materials' or
    4939                      ../@id='chapter-final-preps'"/>
    50       <xsl:when test="../@id='chapter-testsuite-tools' and $testsuite='0'"/>
    5140      <xsl:otherwise>
    5241        <xsl:if test="count(descendant::screen/userinput) &gt; 0 and
     
    8170            <!-- Creating dirs and files -->
    8271          <exsl:document href="{$dirname}/{$order}-{$filename}" method="text">
    83             <xsl:choose>
    84               <xsl:when test="../@id='chapter-chroot'">
    85                 <xsl:text>#!/tools/bin/bash&#xA;set -e&#xA;&#xA;</xsl:text>
    86               </xsl:when>
    87               <xsl:when test="@id='ch-system-stripping'">
    88                 <xsl:text>#!/bin/sh&#xA;</xsl:text>
    89               </xsl:when>
    90               <xsl:otherwise>
    91                 <xsl:text>#!/bin/sh&#xA;set -e&#xA;&#xA;</xsl:text>
    92               </xsl:otherwise>
    93             </xsl:choose>
     72            <xsl:text>#!/bin/sh&#xA;</xsl:text>
     73            <xsl:if test="not(@id='ch-system-stripping')">
     74              <xsl:text>set -e&#xA;&#xA;</xsl:text>
     75            </xsl:if>
    9476            <xsl:if test="sect2[@role='installation']">
    9577              <xsl:text>cd $PKGDIR&#xA;</xsl:text>
     
    11294  </xsl:template>
    11395
    114   <xsl:template match="para/userinput">
    115     <xsl:if test="(contains(string(),'test') or
    116             contains(string(),'check')) and
    117             ($testsuite = '2' or $testsuite = '3')">
    118       <xsl:value-of select="substring-before(string(),'make')"/>
    119       <xsl:text>make -k</xsl:text>
    120       <xsl:value-of select="substring-after(string(),'make')"/>
    121       <xsl:text> &gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
    122     </xsl:if>
    123   </xsl:template>
     96  <xsl:template match="para/userinput"/>
    12497
    12598  <xsl:template match="userinput" mode="screen">
     
    130103        <xsl:text>tar.*</xsl:text>
    131104        <xsl:value-of select="substring-after(string(),'tar.gz')"/>
    132         <xsl:text>&#xA;</xsl:text>
    133       </xsl:when>
    134       <!-- Avoiding a race condition in a patch -->
    135       <xsl:when test="contains(string(),'debian_fixes')">
    136         <xsl:value-of select="substring-before(string(),'patch')"/>
    137         <xsl:text>patch -Z</xsl:text>
    138         <xsl:value-of select="substring-after(string(),'patch')"/>
    139105        <xsl:text>&#xA;</xsl:text>
    140106      </xsl:when>
     
    154120      <xsl:when test="string() = 'make mrproper'">
    155121        <xsl:text>make mrproper&#xA;</xsl:text>
    156         <xsl:if test="ancestor::sect1[@id='ch-boot-kernel']">
    157           <xsl:text>cp -v ../bootkernel-config .config&#xA;</xsl:text>
    158         </xsl:if>
    159         <xsl:if test="ancestor::sect1[@id='ch-bootable-kernel']">
    160           <xsl:text>cp -v ../kernel-config .config&#xA;</xsl:text>
    161         </xsl:if>
     122        <xsl:text>cp -v ../kernel-config .config&#xA;</xsl:text>
    162123      </xsl:when>
    163124      <!-- No interactive commands are needed if the .config file is the proper one -->
    164125      <xsl:when test="contains(string(),'menuconfig')"/>
    165       <!-- The Coreutils and Module-Init-Tools test suites are optional -->
    166       <xsl:when test="(ancestor::sect1[@id='ch-system-coreutils'] or
    167                 ancestor::sect1[@id='ch-system-module-init-tools']) and
    168                 (contains(string(),'check') or
    169                 contains(string(),'dummy'))">
    170         <xsl:choose>
    171           <xsl:when test="$testsuite = '0' or $testsuite = '1'"/>
    172           <xsl:otherwise>
    173             <xsl:apply-templates/>
    174             <xsl:if test="contains(string(),'check')">
    175               <xsl:text> &gt;&gt; $TEST_LOG 2&gt;&amp;1 || true</xsl:text>
    176             </xsl:if>
    177             <xsl:text>&#xA;</xsl:text>
    178           </xsl:otherwise>
    179         </xsl:choose>
    180       </xsl:when>
    181       <!-- Fixing toolchain test suites run -->
    182       <xsl:when test="string() = 'make check' or
    183                 string() = 'make -k check'">
    184         <xsl:choose>
    185           <xsl:when test="$testsuite != '0'">
    186             <xsl:text>make -k check &gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
    187           </xsl:when>
    188         </xsl:choose>
    189       </xsl:when>
    190       <xsl:when test="contains(string(),'glibc-check-log')">
    191         <xsl:choose>
    192           <xsl:when test="$testsuite != '0'">
    193             <xsl:value-of select="substring-before(string(),'&gt;g')"/>
    194             <xsl:text>&gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
    195           </xsl:when>
    196         </xsl:choose>
    197       </xsl:when>
    198       <xsl:when test="contains(string(),'test_summary') or
    199                 contains(string(),'expect -c')">
    200         <xsl:choose>
    201           <xsl:when test="$testsuite != '0'">
    202             <xsl:apply-templates/>
    203             <xsl:if test="contains(string(),'test_summary')">
    204               <xsl:text> &gt;&gt; $TEST_LOG</xsl:text>
    205             </xsl:if>
    206             <xsl:text>&#xA;</xsl:text>
    207           </xsl:when>
    208         </xsl:choose>
    209       </xsl:when>
    210126      <!-- Don't stop on strip run -->
    211127      <xsl:when test="contains(string(),'strip ')">
     
    229145        <xsl:value-of select="$page"/>
    230146      </xsl:when>
    231       <xsl:when test="ancestor::sect1[@id='ch-boot-kernel'] or
    232                       ancestor::sect1[@id='ch-bootable-kernel']">
     147      <xsl:when test="ancestor::sect1[@id='ch-bootable-kernel']">
    233148        <xsl:value-of select="$keymap"/>
    234149      </xsl:when>
Note: See TracChangeset for help on using the changeset viewer.