Set the actual TIMEZONE and PAGE values inside the generated scripts instead of exported envars.

This commit is contained in:
Manuel Canales Esparcia 2006-03-19 12:44:32 +00:00
parent c3c4e1dc59
commit ad71d98ef1
6 changed files with 29 additions and 52 deletions

View file

@ -707,14 +707,6 @@ final_system_Makefiles() { #
temp-perl) wrt_unpack2 "perl-$vrs.tar.*" ;;
*) wrt_unpack2 "$name-$vrs.tar.*" ;;
esac
#
# Export a few 'config' vars..
case $this_script in
*glibc*) # For glibc we can set then TIMEZONE envar.
wrt_export_timezone ;;
*groff*) # For Groff we need to set PAGE envar.
wrt_export_pagesize ;;
esac
fi
#
wrt_run_as_chroot1 "${this_script}" "${file}"

View file

@ -29,6 +29,12 @@
3 = all chapter05 and chapter06 testsuites-->
<xsl:param name="testsuite" select="1"/>
<!-- Time zone -->
<xsl:param name="timezone" select="America/Toronto"/>
<!-- Page size -->
<xsl:param name="page" select="letter"/>
<xsl:template match="/">
<xsl:apply-templates select="//sect1"/>
</xsl:template>
@ -199,13 +205,6 @@
<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
@ -239,7 +238,8 @@
and $testsuite = '0'"/>
<!-- Don't stop on strip run and chapter05 GCC installation test-->
<xsl:when test="contains(string(),'strip ') or
ancestor::sect2[@id='testing-gcc']">
ancestor::sect2[@id='testing-gcc'] and
not(contains(string(),'EOF'))">
<xsl:apply-templates/>
<xsl:text> || true&#xA;</xsl:text>
</xsl:when>
@ -255,10 +255,10 @@
<xsl:choose>
<xsl:when test="ancestor::sect1[@id='ch-system-glibc'] or
ancestor::sect1[@id='ch-system-uclibc']">
<xsl:text>$TIMEZONE</xsl:text>
<xsl:value-of select="$timezone"/>
</xsl:when>
<xsl:when test="ancestor::sect1[@id='ch-system-groff']">
<xsl:text>$PAGE</xsl:text>
<xsl:value-of select="$page"/>
</xsl:when>
<xsl:when test="ancestor::sect1[@id='bootable-kernel']">
<xsl:value-of select="$keymap"/>

View file

@ -354,12 +354,6 @@ chapter6_Makefiles() { # sysroot or chroot build phase
*readjusting*) # For the Re-Adjusting phase we must to cd to the binutils-build directory.
echo -e '\t@echo "export PKGDIR=$(SRC)/binutils-build" > envars' >> $MKFILE.tmp
;;
*glibc* | *uclibc* ) # For glibc and uClibc we need to set TIMEZONE envar.
wrt_export_timezone
;;
*groff* ) # For Groff we need to set PAGE envar.
wrt_export_pagesize
;;
esac
# In the mount of kernel filesystems we need to set LFS and not to use chroot.

View file

@ -23,6 +23,12 @@
<!-- Install vim-lang package? -->
<xsl:param name="vim-lang" select="1"/>
<!-- Time zone -->
<xsl:param name="timezone" select="America/Toronto"/>
<!-- Page size -->
<xsl:param name="page" select="letter"/>
<xsl:template match="/">
<xsl:apply-templates select="//sect1"/>
</xsl:template>
@ -191,10 +197,10 @@
<xsl:template match="replaceable">
<xsl:choose>
<xsl:when test="ancestor::sect1[@id='ch-system-glibc']">
<xsl:text>$TIMEZONE</xsl:text>
<xsl:value-of select="$timezone"/>
</xsl:when>
<xsl:when test="ancestor::sect1[@id='ch-system-groff']">
<xsl:text>$PAGE</xsl:text>
<xsl:value-of select="$page"/>
</xsl:when>
<xsl:otherwise>
<xsl:text>**EDITME</xsl:text>

View file

@ -184,11 +184,6 @@ chapter6_Makefiles() {
wrt_unpack2 "$FILE"
fi
case "${this_script}" in
*glibc* ) wrt_export_timezone ;; # For Glibc we need to set TIMEZONE envar.
*groff* ) wrt_export_pagesize ;; # For Groff we need to set PAGE envar.
esac
# In the mount of kernel filesystems we need to set LFS
# and not to use chroot.
if [[ `_IS_ ${this_script} kernfs` ]] ; then

View file

@ -420,20 +420,6 @@ EOF
}
#----------------------------------#
wrt_export_timezone() { #
#----------------------------------#
echo -e '\t@echo "export TIMEZONE=$(TIMEZONE)" >> envars' >> $MKFILE.tmp
}
#----------------------------------#
wrt_export_pagesize() { #
#----------------------------------#
echo -e '\t@echo "export PAGE=$(PAGE)" >> envars' >> $MKFILE.tmp
}
#----------------------------------#
wrt_export_lang() { #
#----------------------------------#
@ -641,13 +627,15 @@ extract_commands() { #
;;
hlfs)
echo -n "${tab_} ${L_arrow}${BOLD}$MODEL${R_arrow} HLFS architecture"
xsltproc --nonet \
--xinclude \
--stringparam model $MODEL \
--stringparam testsuite $TEST \
--stringparam keymap $KEYMAP \
--stringparam grsecurity_host $GRSECURITY_HOST \
-o ./${PROGNAME}-commands/ $XSL $BOOK/index.xml >>$LOGDIR/$LOG 2>&1
xsltproc --nonet \
--xinclude \
--stringparam model $MODEL \
--stringparam testsuite $TEST \
--stringparam timezone $TIMEZONE \
--stringparam page $PAGE \
--stringparam keymap $KEYMAP \
--stringparam grsecurity_host $GRSECURITY_HOST \
-o ./${PROGNAME}-commands/ $XSL $BOOK/index.xml >>$LOGDIR/$LOG 2>&1
for i in $(find ./${PROGNAME}-commands/chapter07/*) ; do
sed -i 's/"EOF"/EOF/g' $i ;
done
@ -658,6 +646,8 @@ extract_commands() { #
--xinclude \
--stringparam testsuite $TEST \
--stringparam vim-lang $VIMLANG \
--stringparam timezone $TIMEZONE \
--stringparam page $PAGE \
-o ./${PROGNAME}-commands/ $XSL $BOOK/index.xml >>$LOGDIR/$LOG 2>&1
for i in $(find ./${PROGNAME}-commands/chapter07/*) ; do
sed -i 's/"EOF"/EOF/g' $i ;