Changeset 206c894 for CLFS2/clfs2.xsl
- Timestamp:
- 08/05/2006 06:26:19 PM (18 years ago)
- Branches:
- experimental
- Children:
- f28e4bd
- Parents:
- 056486c
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
CLFS2/clfs2.xsl
r056486c r206c894 12 12 version="1.0"> 13 13 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. --> 18 15 19 16 <!-- Compile the keymap into the kernel? --> 20 17 <xsl:param name="keymap" select="none"/> 21 22 <!-- Run test suites?23 0 = none24 1 = only Glibc, GCC and Binutils testsuites25 2 = all testsuites26 3 = alias to 2 -->27 <xsl:param name="testsuite" select="0"/>28 18 29 19 <!-- Install vim-lang package? --> … … 48 38 ../@id='chapter-getting-materials' or 49 39 ../@id='chapter-final-preps'"/> 50 <xsl:when test="../@id='chapter-testsuite-tools' and $testsuite='0'"/>51 40 <xsl:otherwise> 52 41 <xsl:if test="count(descendant::screen/userinput) > 0 and … … 81 70 <!-- Creating dirs and files --> 82 71 <exsl:document href="{$dirname}/{$order}-{$filename}" method="text"> 83 <xsl:choose> 84 <xsl:when test="../@id='chapter-chroot'"> 85 <xsl:text>#!/tools/bin/bash
set -e

</xsl:text> 86 </xsl:when> 87 <xsl:when test="@id='ch-system-stripping'"> 88 <xsl:text>#!/bin/sh
</xsl:text> 89 </xsl:when> 90 <xsl:otherwise> 91 <xsl:text>#!/bin/sh
set -e

</xsl:text> 92 </xsl:otherwise> 93 </xsl:choose> 72 <xsl:text>#!/bin/sh
</xsl:text> 73 <xsl:if test="not(@id='ch-system-stripping')"> 74 <xsl:text>set -e

</xsl:text> 75 </xsl:if> 94 76 <xsl:if test="sect2[@role='installation']"> 95 77 <xsl:text>cd $PKGDIR
</xsl:text> … … 112 94 </xsl:template> 113 95 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> >> $TEST_LOG 2>&1 || true
</xsl:text> 122 </xsl:if> 123 </xsl:template> 96 <xsl:template match="para/userinput"/> 124 97 125 98 <xsl:template match="userinput" mode="screen"> … … 130 103 <xsl:text>tar.*</xsl:text> 131 104 <xsl:value-of select="substring-after(string(),'tar.gz')"/> 132 <xsl:text>
</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')"/>139 105 <xsl:text>
</xsl:text> 140 106 </xsl:when> … … 154 120 <xsl:when test="string() = 'make mrproper'"> 155 121 <xsl:text>make mrproper
</xsl:text> 156 <xsl:if test="ancestor::sect1[@id='ch-boot-kernel']"> 157 <xsl:text>cp -v ../bootkernel-config .config
</xsl:text> 158 </xsl:if> 159 <xsl:if test="ancestor::sect1[@id='ch-bootable-kernel']"> 160 <xsl:text>cp -v ../kernel-config .config
</xsl:text> 161 </xsl:if> 122 <xsl:text>cp -v ../kernel-config .config
</xsl:text> 162 123 </xsl:when> 163 124 <!-- No interactive commands are needed if the .config file is the proper one --> 164 125 <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'] or167 ancestor::sect1[@id='ch-system-module-init-tools']) and168 (contains(string(),'check') or169 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> >> $TEST_LOG 2>&1 || true</xsl:text>176 </xsl:if>177 <xsl:text>
</xsl:text>178 </xsl:otherwise>179 </xsl:choose>180 </xsl:when>181 <!-- Fixing toolchain test suites run -->182 <xsl:when test="string() = 'make check' or183 string() = 'make -k check'">184 <xsl:choose>185 <xsl:when test="$testsuite != '0'">186 <xsl:text>make -k check >> $TEST_LOG 2>&1 || true
</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(),'>g')"/>194 <xsl:text>>> $TEST_LOG 2>&1 || true
</xsl:text>195 </xsl:when>196 </xsl:choose>197 </xsl:when>198 <xsl:when test="contains(string(),'test_summary') or199 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> >> $TEST_LOG</xsl:text>205 </xsl:if>206 <xsl:text>
</xsl:text>207 </xsl:when>208 </xsl:choose>209 </xsl:when>210 126 <!-- Don't stop on strip run --> 211 127 <xsl:when test="contains(string(),'strip ')"> … … 229 145 <xsl:value-of select="$page"/> 230 146 </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']"> 233 148 <xsl:value-of select="$keymap"/> 234 149 </xsl:when>
Note:
See TracChangeset
for help on using the changeset viewer.