Handled and via XSL.

Fixed the chapter05 GCC installation test run.
Fixed blfs-bootscripts installation.
The build_Makefile code need be adapted to that new XSL code.
This commit is contained in:
Manuel Canales Esparcia 2006-03-18 11:42:56 +00:00
parent e2860d3838
commit d540567eb5
4 changed files with 37 additions and 9 deletions

View file

@ -16,6 +16,12 @@
<!-- What libc implentation must be used? -->
<xsl:param name="model" select="glibc"/>
<!-- Is the host kernel using grsecurity? -->
<xsl:param name="grsecurity_host" select="0"/>
<!-- Compile the keymap into the kernel? -->
<xsl:param name="keymap" select="none"/>
<!-- Run test suites?
0 = none
1 = only chapter06 Glibc, GCC and Binutils testsuites
@ -77,7 +83,8 @@
<xsl:text>#!/bin/sh&#xA;set -e&#xA;&#xA;</xsl:text>
</xsl:otherwise>
</xsl:choose>
<xsl:if test="sect2[@role='installation'] or
<xsl:if test="(sect2[@role='installation'] and
not(@id='bootable-kernel')) or
@id='ch-tools-adjusting' or
@id='ch-system-readjusting'">
<xsl:text>cd $PKGDIR&#xA;</xsl:text>
@ -152,6 +159,10 @@
<xsl:value-of select="substring-after(string(),'patch')"/>
<xsl:text>&#xA;</xsl:text>
</xsl:when>
<!-- grsecurity kernel in the host? -->
<xsl:when test="ancestor::sect1[@id='ch-system-kernfs'] and
contains(string(),'sysctl')
and $grsecurity_host ='0'"/>
<!-- Setting $LC_ALL and $LANG for /etc/profile -->
<xsl:when test="ancestor::sect1[@id='bootable-profile'] and
contains(string(),'export LANG=')">
@ -161,6 +172,15 @@
<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'">
<xsl:text>make install&#xA;</xsl:text>
<xsl:text>cd ../blfs-bootscripts-&blfs-bootscripts-version;&#xA;</xsl:text>
</xsl:when>
<!-- Compile the keymap into the kernel? -->
<xsl:when test="contains(string(),'defkeymap') and
$keymap = 'none'"/>
<!-- Copying the kernel config file -->
<xsl:when test="string() = 'make mrproper'">
<xsl:text>make mrproper&#xA;</xsl:text>
@ -197,8 +217,9 @@
<xsl:when test="contains(string(),'hardened-specs') and
ancestor::sect1[@id='ch-system-binutils']
and $testsuite = '0'"/>
<!-- Don't stop on strip run -->
<xsl:when test="contains(string(),'strip ')">
<!-- Don't stop on strip run and chapter05 GCC installation test-->
<xsl:when test="contains(string(),'strip ') or
ancestor::sect2[@id='testing-gcc']">
<xsl:apply-templates/>
<xsl:text> || true&#xA;</xsl:text>
</xsl:when>
@ -219,6 +240,9 @@
<xsl:when test="ancestor::sect1[@id='ch-system-groff']">
<xsl:text>$PAGE</xsl:text>
</xsl:when>
<xsl:when test="ancestor::sect1[@id='bootable-kernel']">
<xsl:value-of select="$keymap"/>
</xsl:when>
<xsl:otherwise>
<xsl:text>**EDITME</xsl:text>
<xsl:apply-templates/>

View file

@ -660,6 +660,8 @@ extract_commands() { #
--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
for i in $(find ./${PROGNAME}-commands/chapter07/*) ; do
sed -i 's/"EOF"/EOF/g' $i ;

View file

@ -26,10 +26,10 @@ RUNMAKE=0
# 1 = only chapter06 Glibc, GCC and Binutils testsuites
# 2 = all chapter06 testsuites
# 3 = all chapter05 and chapter06 testsuites
TEST=0
TEST=1
#--- Run the stripping phases 0(no)/1(yes)
STRIP=0
STRIP=1
#--- page definition for groff letter/A4
PAGE=letter
@ -44,8 +44,10 @@ VIMLANG=1
LC_ALL=$LC_ALL
LANG=$LANG
#--- Include the keymap in the kernel if defined
KEYMAP=/usr/share/kbd/keymaps/i386/qwerty/us.map.gz
#--- Include the keymap in the kernel if defined. Path to the
# keymap file relative to /usr/share/kbd/keymaps/
# (e.g., i386/qwerty/us.map.gz) or "none"
KEYMAP=none
#=== Variables needed by ICA ===
#--- Run ICA testing 0/1 0(no)/1(yes)

View file

@ -92,8 +92,8 @@ inline_doc
for config_param in KEYMAP; do
[[ $1 = "1" ]] && echo "`eval echo $PARAM_VALS`"
[[ -z "${!config_param}" ]] && continue
[[ -e "${!config_param}" ]] && [[ -s "${!config_param}" ]] && continue
[[ "${!config_param}" = "none" ]] && continue
[[ -e "/usr/share/kbd/keymaps/${!config_param}" ]] && [[ -s "/usr/share/kbd/keymaps/${!config_param}" ]] && continue
# If you make it this far then there is a problem
write_error_and_die