Fixed remainig issues in uClibc script generation.

Fixed the chapter6_Makefile code.
This commit is contained in:
Manuel Canales Esparcia 2006-03-18 13:53:37 +00:00
parent 5c5a010778
commit 582feec179
2 changed files with 26 additions and 33 deletions

View file

@ -107,6 +107,9 @@
<xsl:text>pushd ../; tar -xvf blfs-bootscripts-&blfs-bootscripts-version;.* ; popd; &#xA;</xsl:text>
</xsl:if>
</xsl:if>
<xsl:if test="@id='ch-system-kernfs'">
<xsl:text>export HLFS=$LFS&#xA;</xsl:text>
</xsl:if>
<xsl:apply-templates select=".//para/userinput | .//screen"/>
<xsl:text>exit</xsl:text>
</exsl:document>
@ -186,6 +189,23 @@
<xsl:text>make mrproper&#xA;</xsl:text>
<xsl:text>cp -v /sources/kernel-config .config&#xA;</xsl:text>
</xsl:when>
<!-- No interactive commands are allowed -->
<xsl:when test="string() = 'make menuconfig'">
<xsl:text>make oldconfig&#xA;</xsl:text>
</xsl:when>
<!-- For uClibc we need to cd to the Gettext package -->
<xsl:when test="contains(string(),'cd gettext-runtime/')">
<xsl:text>cd ../gettext-*/gettext-runtime</xsl:text>
<xsl:value-of select="substring-after(string(),'gettext-runtime')"/>
<xsl:text>&#xA;</xsl:text>
</xsl:when>
<!-- For uClibc we need to set TIMEZONE envar -->
<xsl:when test="contains(string(),'EST5EDT')">
<xsl:value-of select="substring-before(string(),'EST5EDT')"/>
<xsl:text>${TIMEZONE}</xsl:text>
<xsl:value-of select="substring-after(string(),'EST5EDT')"/>
<xsl:text>&#xA;</xsl:text>
</xsl:when>
<!-- The Coreutils and Module-Init-Tools test suites are optional -->
<xsl:when test="($testsuite = '0' or $testsuite = '1') and
(ancestor::sect1[@id='ch-system-coreutils'] or
@ -193,12 +213,6 @@
(contains(string(),'check') or
contains(string(),'distclean') or
contains(string(),'dummy'))"/>
<!-- For uClibc we need to cd to the Gettext package -->
<xsl:when test="contains(string(),'cd gettext-runtime/')">
<xsl:text>cd ../gettext-*/gettext-runtime</xsl:text>
<xsl:value-of select="substring-after(string(),'gettext-runtime')"/>
<xsl:text>&#xA;</xsl:text>
</xsl:when>
<!-- Fixing toolchain test suites run -->
<xsl:when test="string() = 'make check' or
string() = 'make -k check'">

View file

@ -301,9 +301,6 @@ chapter6_Makefiles() { # sysroot or chroot build phase
*chroot* ) continue ;;
# Test if the stripping phase must be skipped
*-stripping* ) [[ "$STRIP" = "0" ]] && continue ;;
# Select the appropriate library
*glibc*) [[ ${MODEL} = "uclibc" ]] && continue ;;
*uclibc*) [[ ${MODEL} = "glibc" ]] && continue ;;
*) ;;
esac
@ -315,32 +312,14 @@ chapter6_Makefiles() { # sysroot or chroot build phase
name=`echo $this_script | sed -e 's@[0-9]\{3\}-@@'`
#
# Sed replacement for 'nodump' tag in xml scripts until Manuel has a chance to fix them
# Sed replacement to fix some rm command that could fail.
# That should be fixed in the book sources.
#
case $name in
kernfs)
# We are using LFS instead of HLFS..
sed 's/HLFS/LFS/' -i chapter06/$this_script
# Remove sysctl code if host does not have grsecurity enabled
if [[ "$GRSECURITY_HOST" = "0" ]]; then
sed '/sysctl/d' -i chapter06/$this_script
fi
glibc)
sed 's/rm /rm -f /' -i chapter06/$this_script
;;
module-init-tools)
if [[ "$TEST" = "0" ]]; then # This needs rework....
sed '/make distclean/d' -i chapter06/$this_script
fi
;;
glibc) # PATCH.. Turn off error trapping for the remainder of the script.
sed 's|^make install|make install; set +e|' -i chapter06/$this_script
;;
uclibc) # PATCH..
sed 's/EST5EDT/${TIMEZONE}/' -i chapter06/$this_script
# PATCH.. Cannot use interactive programs/scripts.
sed 's/make menuconfig/make oldconfig/' -i chapter06/$this_script
sed 's@^cd gettext-runtime@cd ../gettext-*/gettext-runtime@' -i chapter06/$this_script
;;
gcc) # PATCH..
gcc)
sed 's/rm /rm -f /' -i chapter06/$this_script
;;
esac
@ -383,7 +362,7 @@ chapter6_Makefiles() { # sysroot or chroot build phase
;;
esac
# In the mount of kernel filesystems we need to set HLFS and not to use chroot.
# In the mount of kernel filesystems we need to set LFS and not to use chroot.
if [[ `_IS_ $this_script kernfs` ]] ; then
wrt_run_as_root "${this_script}" "${file}"
#