Add the multilib book: fixes ticket #1722
This commit is contained in:
parent
706e5bf46a
commit
13e52a5572
4 changed files with 58 additions and 34 deletions
33
Config.in
33
Config.in
|
@ -124,6 +124,39 @@ menu "BOOK Settings"
|
||||||
help
|
help
|
||||||
The full path to a local copy of the book XML sources
|
The full path to a local copy of the book XML sources
|
||||||
|
|
||||||
|
choice
|
||||||
|
depends on (BOOK_LFS || BOOK_LFS_SYSD) && (BRANCH || WORKING_COPY)
|
||||||
|
prompt "Mutilib"
|
||||||
|
default LFS_MULTILIB_NO
|
||||||
|
config LFS_MULTILIB_NO
|
||||||
|
bool "Standard LFS on i686 or amd64"
|
||||||
|
help
|
||||||
|
Ues standard LFS book (choose this if not multilib source)
|
||||||
|
|
||||||
|
config LFS_MULTILIB_I686
|
||||||
|
bool "Multilib LFS on amd64 with i686 libraries"
|
||||||
|
help
|
||||||
|
Use Multilib LFS book with i686 libraries
|
||||||
|
|
||||||
|
config LFS_MULTILIB_X32
|
||||||
|
bool "Multilib LFS on amd64 with x32 libraries"
|
||||||
|
help
|
||||||
|
Use Multilib LFS book with x32 libraries
|
||||||
|
|
||||||
|
config LFS_MULTILIB_ALL
|
||||||
|
bool "Multilib LFS on amd64 with i686 and x32 libraries"
|
||||||
|
help
|
||||||
|
Use Multilib LFS book with i686 and x32 libraries
|
||||||
|
|
||||||
|
endchoice
|
||||||
|
|
||||||
|
config MULTILIB
|
||||||
|
string
|
||||||
|
default "default" if LFS_MULTILIB_NO
|
||||||
|
default "ml_32" if LFS_MULTILIB_I686
|
||||||
|
default "ml_x32" if LFS_MULTILIB_X32
|
||||||
|
default "ml_all" if LFS_MULTILIB_ALL
|
||||||
|
|
||||||
#--- End BOOK version
|
#--- End BOOK version
|
||||||
|
|
||||||
#--- CLFS specific params
|
#--- CLFS specific params
|
||||||
|
|
37
LFS/lfs.xsl
37
LFS/lfs.xsl
|
@ -10,10 +10,6 @@
|
||||||
|
|
||||||
<!-- Parameters -->
|
<!-- Parameters -->
|
||||||
|
|
||||||
<!-- which revision attribute to include: can only be sysv or systemd,
|
|
||||||
but we leave checking to the caller-->
|
|
||||||
<xsl:param name="revision" select="'sysv'"/>
|
|
||||||
|
|
||||||
<!-- use package management ?
|
<!-- use package management ?
|
||||||
n = no, original behavior
|
n = no, original behavior
|
||||||
y = yes, add PKG_DEST to scripts in install commands of chapter06-08
|
y = yes, add PKG_DEST to scripts in install commands of chapter06-08
|
||||||
|
@ -118,9 +114,7 @@ otherwise it is in /bin.-->
|
||||||
|
|
||||||
<xsl:template match="chapter">
|
<xsl:template match="chapter">
|
||||||
<xsl:apply-templates select="./sect1[
|
<xsl:apply-templates select="./sect1[
|
||||||
(not(@revision) or @revision=$revision) and
|
.//screen[not(@role) or @role != 'nodump']/
|
||||||
.//screen[(not(@role) or @role != 'nodump') and
|
|
||||||
(not(@revision) or @revision=$revision)]/
|
|
||||||
userinput[not(starts-with(string(),'chroot'))]]">
|
userinput[not(starts-with(string(),'chroot'))]]">
|
||||||
<xsl:with-param name="chap-num" select="position()+3"/>
|
<xsl:with-param name="chap-num" select="position()+3"/>
|
||||||
</xsl:apply-templates>
|
</xsl:apply-templates>
|
||||||
|
@ -190,12 +184,9 @@ otherwise it is in /bin.-->
|
||||||
<xsl:with-param name="order" select="$order"/>
|
<xsl:with-param name="order" select="$order"/>
|
||||||
</xsl:call-template>
|
</xsl:call-template>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:apply-templates select="sect2[not(@revision) or
|
<xsl:apply-templates
|
||||||
@revision=$revision] |
|
select="sect2 |
|
||||||
screen[(not(@role) or
|
screen[not(@role) or @role!='nodump']/userinput"/>
|
||||||
@role!='nodump') and
|
|
||||||
(not(@revision) or
|
|
||||||
@revision=$revision)]/userinput"/>
|
|
||||||
<xsl:if test="@id='ch-system-creatingdirs' and $pkgmngt='y'">
|
<xsl:if test="@id='ch-system-creatingdirs' and $pkgmngt='y'">
|
||||||
<xsl:apply-templates
|
<xsl:apply-templates
|
||||||
select="document('packageManager.xml')//sect1[
|
select="document('packageManager.xml')//sect1[
|
||||||
|
@ -220,10 +211,7 @@ otherwise it is in /bin.-->
|
||||||
|
|
||||||
<xsl:template match="sect2">
|
<xsl:template match="sect2">
|
||||||
<xsl:apply-templates
|
<xsl:apply-templates
|
||||||
select=".//screen[(not(@role) or
|
select=".//screen[not(@role) or @role != 'nodump']/userinput[
|
||||||
@role != 'nodump') and
|
|
||||||
(not(@revision) or
|
|
||||||
@revision=$revision)]/userinput[
|
|
||||||
@remap = 'pre' or
|
@remap = 'pre' or
|
||||||
@remap = 'configure' or
|
@remap = 'configure' or
|
||||||
@remap = 'make' or
|
@remap = 'make' or
|
||||||
|
@ -256,10 +244,8 @@ esac
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:apply-templates
|
<xsl:apply-templates
|
||||||
select=".//screen[(not(@role) or
|
select=".//screen[not(@role) or @role != 'nodump']/
|
||||||
@role != 'nodump') and
|
userinput[@remap = 'install']"/>
|
||||||
(not(@revision) or
|
|
||||||
@revision=$revision)]/userinput[@remap = 'install']"/>
|
|
||||||
<xsl:if test="ancestor::chapter[@id != 'chapter-temporary-tools'] and
|
<xsl:if test="ancestor::chapter[@id != 'chapter-temporary-tools'] and
|
||||||
descendant::screen[not(@role) or
|
descendant::screen[not(@role) or
|
||||||
@role != 'nodump']/userinput[
|
@role != 'nodump']/userinput[
|
||||||
|
@ -345,17 +331,12 @@ fi
|
||||||
</xsl:choose>
|
</xsl:choose>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
<xsl:apply-templates
|
<xsl:apply-templates
|
||||||
select=".//screen[
|
select=".//screen[not(@role) or @role != 'nodump']/userinput[
|
||||||
(not(@role) or
|
|
||||||
@role != 'nodump') and
|
|
||||||
(not(@revision) or
|
|
||||||
@revision=$revision)
|
|
||||||
]/userinput[
|
|
||||||
not(@remap) or
|
not(@remap) or
|
||||||
@remap='adjust' or
|
@remap='adjust' or
|
||||||
@remap='test' and current()/../@id='ch-tools-dejagnu' or
|
@remap='test' and current()/../@id='ch-tools-dejagnu' or
|
||||||
@remap='test' and current()/../@id='ch-system-systemd'
|
@remap='test' and current()/../@id='ch-system-systemd'
|
||||||
]"/>
|
]"/>
|
||||||
<xsl:if test="../@id='ch-system-ncurses' and $ncurses5='y'">
|
<xsl:if test="../@id='ch-system-ncurses' and $ncurses5='y'">
|
||||||
<xsl:apply-templates select=".//screen[@role='nodump']"/>
|
<xsl:apply-templates select=".//screen[@role='nodump']"/>
|
||||||
</xsl:if>
|
</xsl:if>
|
||||||
|
|
|
@ -156,15 +156,27 @@ extract_commands() { #
|
||||||
;;
|
;;
|
||||||
lfs)
|
lfs)
|
||||||
echo -n " ${L_arrow}${BOLD}LFS${R_arrow} build... "
|
echo -n " ${L_arrow}${BOLD}LFS${R_arrow} build... "
|
||||||
|
# The scripts pages are xincluded by the book, so must
|
||||||
|
# be generated for running xsltproc
|
||||||
pushd $BOOK > /dev/null
|
pushd $BOOK > /dev/null
|
||||||
if [ -f process-scripts.sh ]; then
|
if [ -f process-scripts.sh ]; then
|
||||||
bash process-scripts.sh >> $LOGDIR/$LOG 2>&1
|
bash process-scripts.sh >> $LOGDIR/$LOG 2>&1
|
||||||
fi
|
fi
|
||||||
popd > /dev/null
|
popd > /dev/null
|
||||||
|
|
||||||
|
# First profile the book, for revision and arch. Note that
|
||||||
|
# MULTIBLIB is set to "default" if pure 64 bit book. In this
|
||||||
|
# profiling on arch is useless, but does not hurt either.
|
||||||
xsltproc --nonet \
|
xsltproc --nonet \
|
||||||
--xinclude \
|
--xinclude \
|
||||||
--stringparam revision "$INITSYS" \
|
--stringparam profile.revision "$INITSYS" \
|
||||||
|
--stringparam profile.arch "$MULTILIB" \
|
||||||
|
--output prbook.xml \
|
||||||
|
$BOOK/stylesheets/lfs-xsl/profile.xsl \
|
||||||
|
$BOOK/index.xml >> $LOGDIR/$LOG 2>&1
|
||||||
|
|
||||||
|
# Use the profiled book for generating the scriptlets
|
||||||
|
xsltproc --nonet \
|
||||||
--stringparam testsuite "$TEST" \
|
--stringparam testsuite "$TEST" \
|
||||||
--stringparam bomb-testsuite "$BOMB_TEST" \
|
--stringparam bomb-testsuite "$BOMB_TEST" \
|
||||||
--stringparam ncurses5 "$NCURSES5" \
|
--stringparam ncurses5 "$NCURSES5" \
|
||||||
|
@ -194,7 +206,7 @@ extract_commands() { #
|
||||||
--stringparam script-root "$SCRIPT_ROOT" \
|
--stringparam script-root "$SCRIPT_ROOT" \
|
||||||
--output ./${PROGNAME}-commands/ \
|
--output ./${PROGNAME}-commands/ \
|
||||||
$XSL \
|
$XSL \
|
||||||
$BOOK/index.xml >> $LOGDIR/$LOG 2>&1
|
prbook.xml >> $LOGDIR/$LOG 2>&1
|
||||||
# Remove flags requesting user action in some cases. Much easier here than
|
# Remove flags requesting user action in some cases. Much easier here than
|
||||||
# in the stylesheet...
|
# in the stylesheet...
|
||||||
sed -i 's/-iv /-v /' ./${PROGNAME}-commands/chapter??/*kernel*
|
sed -i 's/-iv /-v /' ./${PROGNAME}-commands/chapter??/*kernel*
|
||||||
|
|
|
@ -420,10 +420,9 @@ EOF
|
||||||
#----------------------------------#
|
#----------------------------------#
|
||||||
LUSER_wrt_LogNewFiles() { #
|
LUSER_wrt_LogNewFiles() { #
|
||||||
#----------------------------------#
|
#----------------------------------#
|
||||||
local name=`echo ${1} | sed 's/[0-9]-//'`
|
|
||||||
(
|
(
|
||||||
cat << EOF
|
cat << EOF
|
||||||
@\$(call log_new_files_LUSER,$name)
|
@\$(call log_new_files_LUSER,$1)
|
||||||
EOF
|
EOF
|
||||||
) >> $MKFILE.tmp
|
) >> $MKFILE.tmp
|
||||||
}
|
}
|
||||||
|
@ -431,10 +430,9 @@ EOF
|
||||||
#----------------------------------#
|
#----------------------------------#
|
||||||
CHROOT_wrt_LogNewFiles() { #
|
CHROOT_wrt_LogNewFiles() { #
|
||||||
#----------------------------------#
|
#----------------------------------#
|
||||||
local name=`echo ${1} | sed 's/[0-9]-//'`
|
|
||||||
(
|
(
|
||||||
cat << EOF
|
cat << EOF
|
||||||
@\$(call log_new_files,$name)
|
@\$(call log_new_files,$1)
|
||||||
EOF
|
EOF
|
||||||
) >> $MKFILE.tmp
|
) >> $MKFILE.tmp
|
||||||
}
|
}
|
||||||
|
|
Reference in a new issue