Moved some toolchain code to xsl script, clearer method

This commit is contained in:
George Boudreau 2006-07-28 12:44:37 +00:00
parent 21dab8363a
commit a82bbc0b72
2 changed files with 28 additions and 16 deletions

View file

@ -94,23 +94,38 @@
</xsl:otherwise>
</xsl:choose>
<xsl:if test="(sect2[@role='installation'] and
not(@id='bootable-kernel'))">
not(@id='bootable-kernel'))">
<xsl:text>cd $PKGDIR&#xA;</xsl:text>
<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:if>
<xsl:if test="@id='ch-tools-glibc' or @id='ch-system-glibc'">
<xsl:if test="@id='ch-tools-glibc' or @id='ch-system-glibc'">
<xsl:text>tar -xvf ../glibc-libidn-&glibc-version;.*&#xA;</xsl:text>
</xsl:if>
<xsl:if test="@id='ch-tools-gcc' or @id='ch-system-gcc'">
<xsl:text>pushd ../; tar -xvf gcc-g++-&gcc-version;.*; popd; &#xA;</xsl:text>
<!-- NEW toolchain format -->
<xsl:if test="@id='ch-tools-embryo-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-tools-gcc' and $testsuite = '3'">
<xsl:text>pushd ../; tar -xvf gcc-testsuite-&gcc-version;.*; popd; &#xA;</xsl:text>
</xsl:if>
<xsl:if test="@id='ch-system-gcc' and $testsuite != '0'">
<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-g++-&gcc-version;.*; &#xA;</xsl:text>
<xsl:text>tar -xvf binutils-&binutils-version;.*; &#xA;</xsl:text>
</xsl:if>
<!-- ONLY butterfly has a testsuite -->
<xsl:if test="@id='ch-tools-butterfly-toolchain' and $testsuite = '3'">
<xsl:text>pushd ../; tar -xvf gcc-testsuite-&gcc-version;.*; popd; &#xA;</xsl:text>
</xsl:if>
<!-- END new toolchain format -->
<xsl:if test="@id='bootable-bootscripts'">
<xsl:text>pushd ../; tar -xvf blfs-bootscripts-&blfs-bootscripts-version;.* ; popd; &#xA;</xsl:text>
</xsl:if>
@ -189,6 +204,8 @@
<xsl:value-of select="substring-after(string(),'INPUTRC')"/>
<xsl:text>&#xA;</xsl:text>
</xsl:when>
<!-- Fixing bootscripts installation -->
<xsl:when test="ancestor::sect1[@id='bootable-bootscripts'] and
string() = 'make install'">

View file

@ -68,13 +68,6 @@ process_toolchain() { # embryo,cocoon and butterfly need special handling
echo "${tab_}${tab_}${GREEN}toolchain ${L_arrow}${toolchain}${R_arrow}"
pkg_tarball=$(get_package_tarball_name "binutils")
wrt_Unpack_SetOwner "hlfs" "$pkg_tarball" 1
pkg_tarball=$(get_package_tarball_name "gcc-core")
wrt_Unpack_SetOwner "hlfs" "$pkg_tarball" 1
pkg_tarball=$(get_package_tarball_name "gcc-g++")
wrt_Unpack_SetOwner "hlfs" "$pkg_tarball" 1
case ${toolchain} in
*butterfly*)
[[ "$TEST" != "0" ]] && wrt_test_log2 "${this_script}"
@ -85,6 +78,7 @@ EOF
) >> $MKFILE.tmp
wrt_run_as_chroot1 "$toolchain" "$this_script"
;;
*)
(
cat << EOF
@ -94,7 +88,8 @@ EOF
wrt_ExecuteAsUser "hlfs" "$toolchain" "$this_script"
;;
esac
#
# Safe method to remove packages unpacked outside the toolchain
pkg_tarball=$(get_package_tarball_name "binutils")
wrt_remove_existing_dirs "$pkg_tarball"
pkg_tarball=$(get_package_tarball_name "gcc-core")