From 3f7fbd7beda5d840cd9a15189a94aaad4a802d37 Mon Sep 17 00:00:00 2001 From: Alexey Neyman Date: Tue, 22 Nov 2016 18:10:23 -0800 Subject: Move companion tool build into a separate step. Also, rename "build" -> "for_build", since we're going to have a "for_host" as well. Signed-off-by: Alexey Neyman diff --git a/scripts/build/companion_tools.sh b/scripts/build/companion_tools.sh index b703c41..923c293 100644 --- a/scripts/build/companion_tools.sh +++ b/scripts/build/companion_tools.sh @@ -7,11 +7,11 @@ for f in "${CT_LIB_DIR}/scripts/build/companion_tools/"*.sh; do _f="${_f#???-}" __f="CT_COMP_TOOLS_${_f}" if [ "${!__f}" = "y" ]; then - CT_DoLog DEBUG "Enabling companion tools '${_f}'" + CT_DoLog DEBUG "Enabling companion tool '${_f}'" . "${f}" CT_COMP_TOOLS_FACILITY_LIST="${CT_COMP_TOOLS_FACILITY_LIST} ${_f}" else - CT_DoLog DEBUG "Disabling companion tools '${_f}'" + CT_DoLog DEBUG "Disabling companion tool '${_f}'" fi done @@ -30,9 +30,8 @@ do_companion_tools_extract() { } # Build the companion tools facilities -do_companion_tools() { +do_companion_tools_for_build() { for f in ${CT_COMP_TOOLS_FACILITY_LIST}; do - do_companion_tools_${f}_build + do_companion_tools_${f}_for_build done } - diff --git a/scripts/build/companion_tools/050-make.sh b/scripts/build/companion_tools/050-make.sh index 9458a25..65e42ef 100644 --- a/scripts/build/companion_tools/050-make.sh +++ b/scripts/build/companion_tools/050-make.sh @@ -11,14 +11,19 @@ do_companion_tools_make_extract() { CT_Patch "make" "${CT_MAKE_VERSION}" } -do_companion_tools_make_build() { +do_companion_tools_make_for_build() { CT_DoStep EXTRA "Installing make" mkdir -p "${CT_BUILD_DIR}/build-make" CT_Pushd "${CT_BUILD_DIR}/build-make" + CT_DoLog EXTRA "Configuring make" CT_DoExecLog CFG "${CT_SRC_DIR}/make-${CT_MAKE_VERSION}/configure" \ --prefix="${CT_BUILDTOOLS_PREFIX_DIR}" + + CT_DoLog EXTRA "Building make" CT_DoExecLog ALL make + + CT_DoLog EXTRA "Installing make" CT_DoExecLog ALL make install if [ "${CT_MAKE_GMAKE_SYMLINK}" = "y" ]; then CT_DoExecLog ALL ln -sv make "${CT_BUILDTOOLS_PREFIX_DIR}/bin/gmake" diff --git a/scripts/build/companion_tools/100-m4.sh b/scripts/build/companion_tools/100-m4.sh index 83ab815..6300dd1 100644 --- a/scripts/build/companion_tools/100-m4.sh +++ b/scripts/build/companion_tools/100-m4.sh @@ -10,15 +10,20 @@ do_companion_tools_m4_extract() { CT_Patch "m4" "${CT_M4_VERSION}" } -do_companion_tools_m4_build() { +do_companion_tools_m4_for_build() { CT_DoStep EXTRA "Installing m4" mkdir -p "${CT_BUILD_DIR}/build-m4" CT_Pushd "${CT_BUILD_DIR}/build-m4" + CT_DoLog EXTRA "Configuring m4" CT_DoExecLog CFG \ "${CT_SRC_DIR}/m4-${CT_M4_VERSION}/configure" \ --prefix="${CT_BUILDTOOLS_PREFIX_DIR}" + + CT_DoLog EXTRA "Building m4" CT_DoExecLog ALL make + + CT_DoLog EXTRA "Building m4" CT_DoExecLog ALL make install CT_Popd CT_EndStep diff --git a/scripts/build/companion_tools/200-autoconf.sh b/scripts/build/companion_tools/200-autoconf.sh index e6e5764..243e5d8 100644 --- a/scripts/build/companion_tools/200-autoconf.sh +++ b/scripts/build/companion_tools/200-autoconf.sh @@ -11,7 +11,7 @@ do_companion_tools_autoconf_extract() { CT_Patch "autoconf" "${CT_AUTOCONF_VERSION}" } -do_companion_tools_autoconf_build() { +do_companion_tools_autoconf_for_build() { CT_DoStep EXTRA "Installing autoconf" mkdir -p "${CT_BUILD_DIR}/build-autoconf" CT_Pushd "${CT_BUILD_DIR}/build-autoconf" @@ -21,10 +21,15 @@ do_companion_tools_autoconf_build() { # For reference see: # http://www.gnu.org/software/autoconf/manual/autoconf.html#CONFIG_005fSHELL + CT_DoLog EXTRA "Configuring autoconf" CT_DoExecLog CFG ${CONFIG_SHELL} \ "${CT_SRC_DIR}/autoconf-${CT_AUTOCONF_VERSION}/configure" \ --prefix="${CT_BUILDTOOLS_PREFIX_DIR}" + + CT_DoLog EXTRA "Building autoconf" CT_DoExecLog ALL make + + CT_DoLog EXTRA "Installing autoconf" CT_DoExecLog ALL make install CT_Popd CT_EndStep diff --git a/scripts/build/companion_tools/300-automake.sh b/scripts/build/companion_tools/300-automake.sh index 52f62d2..9d1b6e8 100644 --- a/scripts/build/companion_tools/300-automake.sh +++ b/scripts/build/companion_tools/300-automake.sh @@ -11,15 +11,20 @@ do_companion_tools_automake_extract() { CT_Patch "automake" "${CT_AUTOMAKE_VERSION}" } -do_companion_tools_automake_build() { +do_companion_tools_automake_for_build() { CT_DoStep EXTRA "Installing automake" mkdir -p "${CT_BUILD_DIR}/build-automake" CT_Pushd "${CT_BUILD_DIR}/build-automake" + CT_DoLog EXTRA "Configuring automake" CT_DoExecLog CFG \ "${CT_SRC_DIR}/automake-${CT_AUTOMAKE_VERSION}/configure" \ --prefix="${CT_BUILDTOOLS_PREFIX_DIR}" + + CT_DoLog EXTRA "Building automake" CT_DoExecLog ALL make + + CT_DoLog EXTRA "Installing automake" CT_DoExecLog ALL make install CT_Popd CT_EndStep diff --git a/scripts/build/companion_tools/400-libtool.sh b/scripts/build/companion_tools/400-libtool.sh index cfe0f63..a139369 100644 --- a/scripts/build/companion_tools/400-libtool.sh +++ b/scripts/build/companion_tools/400-libtool.sh @@ -11,15 +11,20 @@ do_companion_tools_libtool_extract() { CT_Patch "libtool" "${CT_LIBTOOL_VERSION}" } -do_companion_tools_libtool_build() { +do_companion_tools_libtool_for_build() { CT_DoStep EXTRA "Installing libtool" mkdir -p "${CT_BUILD_DIR}/build-libtool" CT_Pushd "${CT_BUILD_DIR}/build-libtool" + CT_DoLog EXTRA "Configuring libtool" CT_DoExecLog CFG \ "${CT_SRC_DIR}/libtool-${CT_LIBTOOL_VERSION}/configure" \ --prefix="${CT_BUILDTOOLS_PREFIX_DIR}" + + CT_DoLog EXTRA "Building libtool" CT_DoExecLog ALL make + + CT_DoLog EXTRA "Installing libtool" CT_DoExecLog ALL make install CT_Popd CT_EndStep diff --git a/scripts/crosstool-NG.sh.in b/scripts/crosstool-NG.sh.in index 3d7b91a..bb72069 100644 --- a/scripts/crosstool-NG.sh.in +++ b/scripts/crosstool-NG.sh.in @@ -580,14 +580,8 @@ if [ -z "${CT_RESTART}" ]; then CT_DoExecLog ALL mkdir -p "${CT_SRC_DIR}" fi - if [ "${CT_COMP_TOOLS}" = "y" ]; then - CT_DoStep INFO "Extracting, patching and installing companion tools" - do_companion_tools_extract - do_companion_tools - CT_EndStep - fi - CT_DoStep INFO "Extracting and patching toolchain components" + do_companion_tools_extract do_kernel_extract do_companion_libs_extract do_binutils_extract diff --git a/steps.mk b/steps.mk index 15b9a01..67024ab 100644 --- a/steps.mk +++ b/steps.mk @@ -19,6 +19,7 @@ help-env:: # Please keep the last line with a '\' and keep the following empty line: # it helps when diffing and merging. CT_STEPS := \ + companion_tools_for_build \ companion_libs_for_build \ binutils_for_build \ companion_libs_for_host \ -- cgit v0.10.2-6-g49f6