Revised hlfs.xsl.

May contains some bug yet.
This commit is contained in:
Manuel Canales Esparcia 2006-07-30 10:10:33 +00:00
parent 927254568a
commit f83bceea83

View file

@ -26,7 +26,7 @@
0 = none 0 = none
1 = only chapter06 Glibc, GCC and Binutils testsuites 1 = only chapter06 Glibc, GCC and Binutils testsuites
2 = all chapter06 testsuites 2 = all chapter06 testsuites
3 = all chapter05 and chapter06 testsuites--> 3 = alias to 2 -->
<xsl:param name="testsuite" select="1"/> <xsl:param name="testsuite" select="1"/>
<!-- Time zone --> <!-- Time zone -->
@ -99,29 +99,21 @@
<xsl:if test="@id='ch-tools-uclibc' or @id='ch-system-uclibc'"> <xsl:if test="@id='ch-tools-uclibc' or @id='ch-system-uclibc'">
<xsl:text>pushd ../; tar -xvf gettext-&gettext-version;.*; popd; &#xA;</xsl:text> <xsl:text>pushd ../; tar -xvf gettext-&gettext-version;.*; popd; &#xA;</xsl:text>
</xsl:if> </xsl:if>
<!-- NEW toolchain format, from inside ./sources dir unpack binutils and gcc --> <!-- NEW toolchain format, from inside ./sources dir unpack binutils and gcc -->
<xsl:if test="@id='ch-tools-embryo-toolchain'"> <xsl:if test="@id='ch-tools-embryo-toolchain' or
<xsl:text>tar -xvf gcc-core-&gcc-version;.*; &#xA;</xsl:text> @id='ch-tools-cocoon-toolchain' or
<xsl:text>tar -xvf gcc-g++-&gcc-version;.*; &#xA;</xsl:text> @id='ch-system-butterfly-toolchain'">
<xsl:text>tar -xvf binutils-&binutils-version;.*; &#xA;</xsl:text>
</xsl:if>
<xsl:if test="@id='ch-tools-cocoon-toolchain'">
<xsl:text>tar -xvf gcc-core-&gcc-version;.*; &#xA;</xsl:text>
<xsl:text>tar -xvf gcc-g++-&gcc-version;.*; &#xA;</xsl:text>
<xsl:text>tar -xvf binutils-&binutils-version;.*; &#xA;</xsl:text>
</xsl:if>
<xsl:if test="@id='ch-system-butterfly-toolchain'">
<xsl:text>tar -xvf gcc-core-&gcc-version;.*; &#xA;</xsl:text> <xsl:text>tar -xvf gcc-core-&gcc-version;.*; &#xA;</xsl:text>
<xsl:text>tar -xvf gcc-g++-&gcc-version;.*; &#xA;</xsl:text> <xsl:text>tar -xvf gcc-g++-&gcc-version;.*; &#xA;</xsl:text>
<xsl:text>tar -xvf binutils-&binutils-version;.*; &#xA;</xsl:text> <xsl:text>tar -xvf binutils-&binutils-version;.*; &#xA;</xsl:text>
</xsl:if> </xsl:if>
<!-- ONLY butterfly has a testsuite --> <!-- ONLY butterfly has a testsuite -->
<xsl:if test="@id='ch-tools-butterfly-toolchain' and $testsuite = '3'"> <xsl:if test="@id='ch-tools-butterfly-toolchain' and $testsuite != '0'">
<xsl:text>tar -xvf gcc-testsuite-&gcc-version;.*; &#xA;</xsl:text> <xsl:text>tar -xvf gcc-testsuite-&gcc-version;.*; &#xA;</xsl:text>
</xsl:if> </xsl:if>
<!-- END new toolchain format --> <!-- END new toolchain format -->
<xsl:if test="@id='bootable-bootscripts'"> <xsl:if test="@id='bootable-bootscripts'">
<xsl:text>pushd ../; tar -xvf blfs-bootscripts-&blfs-bootscripts-version;.* ; popd; &#xA;</xsl:text> <xsl:text>pushd ../; tar -xvf blfs-bootscripts-&blfs-bootscripts-version;.* ; popd; &#xA;</xsl:text>
</xsl:if> </xsl:if>
@ -132,12 +124,6 @@
</xsl:if> </xsl:if>
</xsl:template> </xsl:template>
<xsl:template match="literal">
<xsl:if test="@condition=$model or not(@condition)">
<xsl:apply-templates/>
</xsl:if>
</xsl:template>
<xsl:template match="screen"> <xsl:template match="screen">
<xsl:if test="(@condition=$model or not(@condition)) and <xsl:if test="(@condition=$model or not(@condition)) and
child::* = userinput and not(@role = 'nodump')"> child::* = userinput and not(@role = 'nodump')">
@ -147,24 +133,12 @@
<xsl:template match="para/userinput"> <xsl:template match="para/userinput">
<xsl:if test="(contains(string(),'test') or <xsl:if test="(contains(string(),'test') or
contains(string(),'check')) and contains(string(),'check')) and
(($testsuite = '1' and ($testsuite = '2' or $testsuite = '3')">
(ancestor::sect1[@id='ch-system-gcc'] or <xsl:value-of select="substring-before(string(),'make')"/>
ancestor::sect1[@id='ch-system-glibc'])) or <xsl:text>make -k</xsl:text>
($testsuite = '2' and <xsl:value-of select="substring-after(string(),'make')"/>
ancestor::chapter[@id='chapter-building-system']) or <xsl:text> &gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
$testsuite = '3')">
<xsl:choose>
<xsl:when test="ancestor::sect1[@id='ch-system-gcc']">
<xsl:text>make -k check &gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="substring-before(string(),'make')"/>
<xsl:text>make -k</xsl:text>
<xsl:value-of select="substring-after(string(),'make')"/>
<xsl:text> &gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
</xsl:otherwise>
</xsl:choose>
</xsl:if> </xsl:if>
</xsl:template> </xsl:template>
@ -200,8 +174,6 @@
<xsl:value-of select="substring-after(string(),'INPUTRC')"/> <xsl:value-of select="substring-after(string(),'INPUTRC')"/>
<xsl:text>&#xA;</xsl:text> <xsl:text>&#xA;</xsl:text>
</xsl:when> </xsl:when>
<!-- Fixing bootscripts installation --> <!-- Fixing bootscripts installation -->
<xsl:when test="ancestor::sect1[@id='bootable-bootscripts'] and <xsl:when test="ancestor::sect1[@id='bootable-bootscripts'] and
string() = 'make install'"> string() = 'make install'">
@ -241,24 +213,23 @@
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
</xsl:when> </xsl:when>
<!-- Fixing butterfly toolchain test suites run -->
<!-- Fixing toolchain test suites run --> <xsl:when test="string() = 'make -k check'">
<xsl:when test="string() = 'make check' or
string() = 'make -k check'">
<xsl:choose> <xsl:choose>
<xsl:when test="(($testsuite = '1' or $testsuite = '2') and <xsl:when test="$testsuite != '0'">
ancestor::chapter[@id='chapter-building-system']) or
$testsuite = '3'">
<xsl:text>make -k check &gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text> <xsl:text>make -k check &gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
</xsl:when> </xsl:when>
</xsl:choose> </xsl:choose>
</xsl:when> </xsl:when>
<!-- Fixing Glbc test suite -->
<!-- Disable any glibc checks --> <xsl:when test="contains(string(),'glibc-check-log')">
<xsl:when test="contains(string(),'gcc -fno-stack-protector') and <xsl:choose>
ancestor::sect1[@id='ch-system-glibc'] <xsl:when test="$testsuite != '0'">
and $testsuite = '0'"/> <xsl:value-of select="substring-before(string(),'&gt; glibc-')"/>
<xsl:text>&gt;&gt; $TEST_LOG 2&gt;&amp;1 || true&#xA;</xsl:text>
</xsl:when>
</xsl:choose>
</xsl:when>
<!-- Don't stop on strip run and chapter05 GCC installation test--> <!-- Don't stop on strip run and chapter05 GCC installation test-->
<xsl:when test="contains(string(),'strip ') or <xsl:when test="contains(string(),'strip ') or
ancestor::sect2[@id='testing-gcc'] and ancestor::sect2[@id='testing-gcc'] and
@ -266,7 +237,6 @@
<xsl:apply-templates/> <xsl:apply-templates/>
<xsl:text> || true&#xA;</xsl:text> <xsl:text> || true&#xA;</xsl:text>
</xsl:when> </xsl:when>
<!-- The rest of commands --> <!-- The rest of commands -->
<xsl:otherwise> <xsl:otherwise>
<xsl:apply-templates/> <xsl:apply-templates/>
@ -275,6 +245,12 @@
</xsl:choose> </xsl:choose>
</xsl:template> </xsl:template>
<xsl:template match="literal">
<xsl:if test="@condition=$model or not(@condition)">
<xsl:apply-templates/>
</xsl:if>
</xsl:template>
<xsl:template match="replaceable"> <xsl:template match="replaceable">
<xsl:choose> <xsl:choose>
<xsl:when test="ancestor::sect1[@id='ch-system-glibc'] or <xsl:when test="ancestor::sect1[@id='ch-system-glibc'] or