Add optimization (MAKEFLAGS only) for the cross tools part of CLFS

This commit is contained in:
Pierre Labastie 2013-09-27 20:43:43 +00:00
parent 7ce6de2ee4
commit ce262a78a8
2 changed files with 14 additions and 9 deletions

View file

@ -120,6 +120,7 @@ cross_tools_Makefiles() { #
# If $pkg_tarball isn't empty, we've got a package...
#
[[ "$pkg_tarball" != "" ]] && LUSER_wrt_unpack "$pkg_tarball"
[[ "$pkg_tarball" != "" ]] && [[ "$OPTIMIZE" = 3 ]] && wrt_makeflags "${name}"
#
LUSER_wrt_RunAsUser "${file}"
#
@ -178,7 +179,7 @@ temptools_Makefiles() { #
# Insert instructions for unpacking the package and to set the PKGDIR variable.
#
[[ "$pkg_tarball" != "" ]] && LUSER_wrt_unpack "$pkg_tarball"
[[ "$pkg_tarball" != "" ]] && [[ "$OPTIMIZE" = "2" ]] && wrt_optimize "$name" && wrt_makeflags "$name"
[[ "$pkg_tarball" != "" ]] && [[ "$OPTIMIZE" -ge "2" ]] && wrt_optimize "$name" && wrt_makeflags "$name"
#
LUSER_wrt_RunAsUser "${file}"
#
@ -231,7 +232,7 @@ chroot_Makefiles() { #
*util-linux)
LUSER_wrt_target "${this_script}" "$PREV"
LUSER_wrt_unpack "$pkg_tarball"
[[ "$OPTIMIZE" = "2" ]] && wrt_optimize "$name" && wrt_makeflags "$name"
[[ "$OPTIMIZE" -ge "2" ]] && wrt_optimize "$name" && wrt_makeflags "$name"
LUSER_wrt_RunAsUser "${file}"
LUSER_RemoveBuildDirs "${name}"
wrt_touch
@ -240,7 +241,7 @@ chroot_Makefiles() { #
*util-linux-ng)
LUSER_wrt_target "${this_script}" "$PREV"
LUSER_wrt_unpack "$pkg_tarball"
[[ "$OPTIMIZE" = "2" ]] && wrt_optimize "$name" && wrt_makeflags "$name"
[[ "$OPTIMIZE" -ge "2" ]] && wrt_optimize "$name" && wrt_makeflags "$name"
LUSER_wrt_RunAsUser "${file}"
LUSER_RemoveBuildDirs "${name}"
wrt_touch
@ -249,7 +250,7 @@ chroot_Makefiles() { #
*util-linux-libs)
LUSER_wrt_target "${this_script}" "$PREV"
LUSER_wrt_unpack "$pkg_tarball"
[[ "$OPTIMIZE" = "2" ]] && wrt_optimize "$name" && wrt_makeflags "$name"
[[ "$OPTIMIZE" -ge "2" ]] && wrt_optimize "$name" && wrt_makeflags "$name"
LUSER_wrt_RunAsUser "${file}"
LUSER_RemoveBuildDirs "${name}"
wrt_touch
@ -258,7 +259,7 @@ chroot_Makefiles() { #
*e2fsprogs)
LUSER_wrt_target "${this_script}" "$PREV"
LUSER_wrt_unpack "$pkg_tarball"
[[ "$OPTIMIZE" = "2" ]] && wrt_optimize "$name" && wrt_makeflags "$name"
[[ "$OPTIMIZE" -ge "2" ]] && wrt_optimize "$name" && wrt_makeflags "$name"
LUSER_wrt_RunAsUser "${file}"
LUSER_RemoveBuildDirs "${name}"
wrt_touch
@ -267,7 +268,7 @@ chroot_Makefiles() { #
*e2fsprogs-libs)
LUSER_wrt_target "${this_script}" "$PREV"
LUSER_wrt_unpack "$pkg_tarball"
[[ "$OPTIMIZE" = "2" ]] && wrt_optimize "$name" && wrt_makeflags "$name"
[[ "$OPTIMIZE" -ge "2" ]] && wrt_optimize "$name" && wrt_makeflags "$name"
LUSER_wrt_RunAsUser "${file}"
LUSER_RemoveBuildDirs "${name}"
wrt_touch
@ -289,7 +290,7 @@ chroot_Makefiles() { #
#
if [ "$pkg_tarball" != "" ] ; then
CHROOT_Unpack "$pkg_tarball"
[[ "$OPTIMIZE" = "2" ]] && wrt_optimize "$name" && wrt_makeflags "$name"
[[ "$OPTIMIZE" -ge "2" ]] && wrt_optimize "$name" && wrt_makeflags "$name"
fi
#
# Select a script execution method
@ -377,7 +378,7 @@ boot_Makefiles() { #
# Insert instructions for unpacking the package and changing directories
#
[[ "$pkg_tarball" != "" ]] && LUSER_wrt_unpack "$pkg_tarball"
[[ "$pkg_tarball" != "" ]] && [[ "$OPTIMIZE" = "2" ]] && wrt_optimize "$name" && wrt_makeflags "$name"
[[ "$pkg_tarball" != "" ]] && [[ "$OPTIMIZE" -ge "2" ]] && wrt_optimize "$name" && wrt_makeflags "$name"
#
# Select a script execution method
case $this_script in
@ -448,7 +449,7 @@ testsuite_tools_Makefiles() { #
CHROOT_wrt_target "${this_script}" "$PREV"
#
CHROOT_Unpack "$pkg_tarball"
[[ "$OPTIMIZE" = "2" ]] && wrt_optimize "$name" && wrt_makeflags "$name"
[[ "$OPTIMIZE" -ge "2" ]] && wrt_optimize "$name" && wrt_makeflags "$name"
#
CHROOT_wrt_RunAsRoot "${file}"
#

View file

@ -1086,6 +1086,9 @@ if !BOOK_CLFS2 && !BOOK_CLFS3
config OPT_2
bool "Both temp tools and final system"
config OPT_3
bool "Cross tools (only MAKEFLAGS), temp tools and final system" if BOOK_CLFS
endchoice
config OPTIMIZE
@ -1093,6 +1096,7 @@ if !BOOK_CLFS2 && !BOOK_CLFS3
default "0" if !CONFIG_OPTIMIZE
default "1" if OPT_1
default "2" if OPT_2
default "3" if OPT_3
endif
#--- End Optimizations