summaryrefslogtreecommitdiff
path: root/scripts/build/companion_tools.sh
diff options
context:
space:
mode:
authorAlexey Neyman <stilor@att.net>2016-11-29 00:55:22 (GMT)
committerAlexey Neyman <stilor@att.net>2016-12-02 23:03:15 (GMT)
commitcf86df688a8e7aeba28767ae0f841022a2e8347b (patch)
tree1a66218983063c9531b00724d19967cbe5ceed8a /scripts/build/companion_tools.sh
parent3f7fbd7beda5d840cd9a15189a94aaad4a802d37 (diff)
Add 'companion tools for host' step.
Signed-off-by: Alexey Neyman <stilor@att.net>
Diffstat (limited to 'scripts/build/companion_tools.sh')
-rw-r--r--scripts/build/companion_tools.sh38
1 files changed, 37 insertions, 1 deletions
diff --git a/scripts/build/companion_tools.sh b/scripts/build/companion_tools.sh
index 923c293..415f3a2 100644
--- a/scripts/build/companion_tools.sh
+++ b/scripts/build/companion_tools.sh
@@ -29,9 +29,45 @@ do_companion_tools_extract() {
done
}
-# Build the companion tools facilities
+# Build the companion tools facilities for build
do_companion_tools_for_build() {
+ # Skip out if:
+ # - native/cross, and companion tools were neither selected
+ # to be built, nor included in the final toolchain
+ # - canadian/cross-native, and companion tools were not
+ # selected to be built
+ case "${CT_TOOLCHAIN_TYPE}" in
+ native|cross)
+ if [ -z "${CT_COMP_TOOLS}${CT_COMP_TOOLS_FOR_HOST}" ]; then
+ return
+ fi
+ ;;
+ canadian|cross-native)
+ if [ -z "${CT_COMP_TOOLS}" ]; then
+ return
+ fi
+ ;;
+ esac
for f in ${CT_COMP_TOOLS_FACILITY_LIST}; do
do_companion_tools_${f}_for_build
done
}
+
+# Build the companion tools facilities for host
+do_companion_tools_for_host() {
+ # For native/cross, build==host, and the tools were built
+ # earlier by do_companion_tools_for_build.
+ case "${CT_TOOLCHAIN_TYPE}" in
+ native|cross)
+ return
+ ;;
+ canadian|cross-native)
+ if [ -z "${CT_COMP_TOOLS_FOR_HOST}" ]; then
+ return
+ fi
+ ;;
+ esac
+ for f in ${CT_COMP_TOOLS_FACILITY_LIST}; do
+ do_companion_tools_${f}_for_host
+ done
+}