Ported r2889 from trunk

This commit is contained in:
Manuel Canales Esparcia 2006-08-05 19:07:42 +00:00
parent 206c894fec
commit f28e4bd9e0
2 changed files with 10 additions and 45 deletions

View file

@ -201,30 +201,9 @@ cross_tools_Makefiles() { #
#-----------------------------# #-----------------------------#
final_system_Makefiles() { # final_system_Makefiles() { #
#-----------------------------# #-----------------------------#
# Set envars and scripts for iteration targets echo "${tab_}${GREEN}Processing... ${L_arrow}final system${R_arrow}"
LOGS="" # Start with an empty global LOGS envar
if [[ -z "$1" ]] ; then
local N=""
else
local N=-build_$1
local basicsystem=""
mkdir final-system$N
cp final-system/* final-system$N
for script in final-system$N/* ; do
# Overwrite existing symlinks, files, and dirs
sed -e 's/ln -sv/&f/g' \
-e 's/mv -v/&f/g' \
-e 's/mkdir -v/&p/g' -i ${script}
done
# Remove Bzip2 binaries before make install
sed -e 's@make install@rm -vf /usr/bin/bz*\n&@' -i final-system$N/*-bzip2
# Delete *old Readline libraries just after make install
sed -e 's@make install@&\nrm -v /lib/lib{history,readline}*old@' -i final-system$N/*-readline
fi
echo "${tab_}${GREEN}Processing... ${L_arrow}final system$N${R_arrow}" for file in final-system/* ; do
for file in final-system$N/* ; do
# Keep the script file name # Keep the script file name
this_script=`basename $file` this_script=`basename $file`
@ -243,24 +222,12 @@ final_system_Makefiles() { #
-e 's@n32@@'` -e 's@n32@@'`
# Find the version of the command files, if it corresponds with the building of # Find the version of the command files, if it corresponds with the building of
# a specific package. We need this here to can skip scripts not needed for # a specific package.
# iterations rebuilds
pkg_tarball=$(get_package_tarball_name $name) pkg_tarball=$(get_package_tarball_name $name)
if [[ "$pkg_tarball" = "" ]] && [[ -n "$N" ]] ; then
case "${this_script}" in
*stripping*) ;;
*) continue ;;
esac
fi
# Append each name of the script files to a list (this will become # Append each name of the script files to a list (this will become
# the names of the targets in the Makefile # the names of the targets in the Makefile
basicsystem="$basicsystem ${this_script}${N}" basicsystem="$basicsystem ${this_script}"
# Append each name of the script files to a list (this will become
# the names of the logs to be moved for each iteration)
LOGS="$LOGS ${this_script}"
#--------------------------------------------------------------------# #--------------------------------------------------------------------#
# >>>>>>>> START BUILDING A Makefile ENTRY <<<<<<<< # # >>>>>>>> START BUILDING A Makefile ENTRY <<<<<<<< #
@ -268,7 +235,7 @@ final_system_Makefiles() { #
# #
# Drop in the name of the target on a new line, and the previous target # Drop in the name of the target on a new line, and the previous target
# as a dependency. Also call the echo_message function. # as a dependency. Also call the echo_message function.
wrt_target "${this_script}${N}" "$PREV" wrt_target "${this_script}" "$PREV"
# #
# If $pkg_tarball isn't empty, we've got a package... # If $pkg_tarball isn't empty, we've got a package...
if [ "$pkg_tarball" != "" ] ; then if [ "$pkg_tarball" != "" ] ; then
@ -289,9 +256,7 @@ final_system_Makefiles() { #
#--------------------------------------------------------------------# #--------------------------------------------------------------------#
# #
# Keep the script file name for Makefile dependencies. # Keep the script file name for Makefile dependencies.
PREV=${this_script}${N} PREV=${this_script}
# Set system_build envar for iteration targets
system_build=$basicsystem
done # for file in final-system/* ... done # for file in final-system/* ...
} }
@ -410,9 +375,9 @@ bootable_Makefiles() { #
wrt_RunAsUser "${this_script}" "${file}" wrt_RunAsUser "${this_script}" "${file}"
fi fi
;; ;;
*chowning) wrt_RunAsRoot "${this_script}" "${file}" *chowning) wrt_RunAsRoot "${this_script}" "${file}"
;; ;;
*) wrt_RunAsUser "${this_script}" "${file}" *) wrt_RunAsUser "${this_script}" "${file}"
;; ;;
esac esac
# #
@ -489,7 +454,7 @@ chapter6: chapter5 $bootable
clean-all: clean clean-all: clean
rm -rf ./{clfs2-commands,logs,Makefile,*.xsl,makefile-functions,packages,patches} rm -rf ./{clfs2-commands,logs,Makefile,*.xsl,makefile-functions,packages,patches}
clean: clean:
restart: restart:
@echo "This feature does not exist for the CLFS makefile. (yet)" @echo "This feature does not exist for the CLFS makefile. (yet)"

View file

@ -88,7 +88,7 @@ inline_doc
# First internal variables, then the ones that change the book's flavour, and lastly system configuration variables # First internal variables, then the ones that change the book's flavour, and lastly system configuration variables
local -r hlfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE MODEL GRSECURITY_HOST TEST BOMB_TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB CONFIG GETKERNEL KEYMAP PAGE TIMEZONE LANG LC_ALL LUSER LGROUP" local -r hlfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE MODEL GRSECURITY_HOST TEST BOMB_TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB CONFIG GETKERNEL KEYMAP PAGE TIMEZONE LANG LC_ALL LUSER LGROUP"
local -r clfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE METHOD ARCH TARGET TEST BOMB_TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB BOOT_CONFIG CONFIG GETKERNEL KEYMAP VIMLANG PAGE TIMEZONE LANG LUSER LGROUP" local -r clfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE METHOD ARCH TARGET TEST BOMB_TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB BOOT_CONFIG CONFIG GETKERNEL KEYMAP VIMLANG PAGE TIMEZONE LANG LUSER LGROUP"
local -r clfs2_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE ARCH TARGET OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB CONFIG GETKERNEL KEYMAP VIMLANG PAGE TIMEZONE LANG LUSER LGROUP" local -r clfs2_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE ARCH TARGET OPTIMIZE REPORT STRIP FSTAB CONFIG GETKERNEL KEYMAP VIMLANG PAGE TIMEZONE LANG LUSER LGROUP"
local -r lfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE TEST BOMB_TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB CONFIG GETKERNEL VIMLANG PAGE TIMEZONE LANG LUSER LGROUP" local -r lfs_PARAM_LIST="BOOK BUILDDIR SRC_ARCHIVE GETPKG RUNMAKE TEST BOMB_TEST OPTIMIZE REPORT COMPARE RUN_ICA RUN_FARCE ITERATIONS STRIP FSTAB CONFIG GETKERNEL VIMLANG PAGE TIMEZONE LANG LUSER LGROUP"
local -r ERROR_MSG_pt1='The variable \"${L_arrow}${config_param}${R_arrow}\" value ${L_arrow}${BOLD}${!config_param}${R_arrow} is invalid,' local -r ERROR_MSG_pt1='The variable \"${L_arrow}${config_param}${R_arrow}\" value ${L_arrow}${BOLD}${!config_param}${R_arrow} is invalid,'