Add the multilib book: fixes ticket #1722

This commit is contained in:
Pierre Labastie 2020-06-20 17:16:22 +00:00
parent 706e5bf46a
commit 13e52a5572
4 changed files with 58 additions and 34 deletions

View file

@ -124,6 +124,39 @@ menu "BOOK Settings"
help
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
#--- CLFS specific params

View file

@ -10,10 +10,6 @@
<!-- 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 ?
n = no, original behavior
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:apply-templates select="./sect1[
(not(@revision) or @revision=$revision) and
.//screen[(not(@role) or @role != 'nodump') and
(not(@revision) or @revision=$revision)]/
.//screen[not(@role) or @role != 'nodump']/
userinput[not(starts-with(string(),'chroot'))]]">
<xsl:with-param name="chap-num" select="position()+3"/>
</xsl:apply-templates>
@ -190,12 +184,9 @@ otherwise it is in /bin.-->
<xsl:with-param name="order" select="$order"/>
</xsl:call-template>
</xsl:if>
<xsl:apply-templates select="sect2[not(@revision) or
@revision=$revision] |
screen[(not(@role) or
@role!='nodump') and
(not(@revision) or
@revision=$revision)]/userinput"/>
<xsl:apply-templates
select="sect2 |
screen[not(@role) or @role!='nodump']/userinput"/>
<xsl:if test="@id='ch-system-creatingdirs' and $pkgmngt='y'">
<xsl:apply-templates
select="document('packageManager.xml')//sect1[
@ -220,10 +211,7 @@ otherwise it is in /bin.-->
<xsl:template match="sect2">
<xsl:apply-templates
select=".//screen[(not(@role) or
@role != 'nodump') and
(not(@revision) or
@revision=$revision)]/userinput[
select=".//screen[not(@role) or @role != 'nodump']/userinput[
@remap = 'pre' or
@remap = 'configure' or
@remap = 'make' or
@ -256,10 +244,8 @@ esac
</xsl:choose>
</xsl:if>
<xsl:apply-templates
select=".//screen[(not(@role) or
@role != 'nodump') and
(not(@revision) or
@revision=$revision)]/userinput[@remap = 'install']"/>
select=".//screen[not(@role) or @role != 'nodump']/
userinput[@remap = 'install']"/>
<xsl:if test="ancestor::chapter[@id != 'chapter-temporary-tools'] and
descendant::screen[not(@role) or
@role != 'nodump']/userinput[
@ -345,12 +331,7 @@ fi
</xsl:choose>
</xsl:if>
<xsl:apply-templates
select=".//screen[
(not(@role) or
@role != 'nodump') and
(not(@revision) or
@revision=$revision)
]/userinput[
select=".//screen[not(@role) or @role != 'nodump']/userinput[
not(@remap) or
@remap='adjust' or
@remap='test' and current()/../@id='ch-tools-dejagnu' or

View file

@ -156,15 +156,27 @@ extract_commands() { #
;;
lfs)
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
if [ -f process-scripts.sh ]; then
bash process-scripts.sh >> $LOGDIR/$LOG 2>&1
fi
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 \
--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 bomb-testsuite "$BOMB_TEST" \
--stringparam ncurses5 "$NCURSES5" \
@ -194,7 +206,7 @@ extract_commands() { #
--stringparam script-root "$SCRIPT_ROOT" \
--output ./${PROGNAME}-commands/ \
$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
# in the stylesheet...
sed -i 's/-iv /-v /' ./${PROGNAME}-commands/chapter??/*kernel*

View file

@ -420,10 +420,9 @@ EOF
#----------------------------------#
LUSER_wrt_LogNewFiles() { #
#----------------------------------#
local name=`echo ${1} | sed 's/[0-9]-//'`
(
cat << EOF
@\$(call log_new_files_LUSER,$name)
@\$(call log_new_files_LUSER,$1)
EOF
) >> $MKFILE.tmp
}
@ -431,10 +430,9 @@ EOF
#----------------------------------#
CHROOT_wrt_LogNewFiles() { #
#----------------------------------#
local name=`echo ${1} | sed 's/[0-9]-//'`
(
cat << EOF
@\$(call log_new_files,$name)
@\$(call log_new_files,$1)
EOF
) >> $MKFILE.tmp
}