summaryrefslogtreecommitdiff
path: root/scripts/build/cc.sh
diff options
context:
space:
mode:
authorBryan Hundven <bryanhundven@gmail.com>2015-06-02 02:33:20 (GMT)
committerBryan Hundven <bryanhundven@gmail.com>2015-06-02 02:33:20 (GMT)
commit031f5521904f9790d7d4c16f6b6e6c61059c6000 (patch)
treea1bebd378233722de9f53e1f916d97b9d728a973 /scripts/build/cc.sh
parentfd793b11c8ca007539b48572e90fcdd71f38cb49 (diff)
parent00e7d4fd7b7868f1b3cce0d502ae6ee7723c4188 (diff)
Merge pull request #30 from diorcety-ctng/multi_cc
Add multiple compiler structure
Diffstat (limited to 'scripts/build/cc.sh')
-rw-r--r--scripts/build/cc.sh58
1 files changed, 58 insertions, 0 deletions
diff --git a/scripts/build/cc.sh b/scripts/build/cc.sh
new file mode 100644
index 0000000..3c8aaef
--- /dev/null
+++ b/scripts/build/cc.sh
@@ -0,0 +1,58 @@
+# Wrapper to build the companion tools facilities
+
+# List all companion tools facilities, and parse their scripts
+CT_CC_FACILITY_LIST=
+for f in "${CT_LIB_DIR}/scripts/build/cc/"*.sh; do
+ _f="$(basename "${f}" .sh)"
+ _f="${_f#???-}"
+ __f="CT_CC_${_f}"
+ if [ "${!__f}" = "y" ]; then
+ CT_DoLog DEBUG "Enabling cc '${_f}'"
+ . "${f}"
+ CT_CC_FACILITY_LIST="${CT_CC_FACILITY_LIST} ${_f}"
+ else
+ CT_DoLog DEBUG "Disabling cc '${_f}'"
+ fi
+done
+
+# Download the cc facilities
+do_cc_get() {
+ for f in ${CT_CC_FACILITY_LIST}; do
+ do_${f}_get
+ done
+}
+
+# Extract and patch the cc facilities
+do_cc_extract() {
+ for f in ${CT_CC_FACILITY_LIST}; do
+ do_${f}_extract
+ done
+}
+
+# Core pass 1 the cc facilities
+do_cc_core_pass_1() {
+ for f in ${CT_CC_FACILITY_LIST}; do
+ do_${f}_core_pass_1
+ done
+}
+
+# Core pass 2 the cc facilities
+do_cc_core_pass_2() {
+ for f in ${CT_CC_FACILITY_LIST}; do
+ do_${f}_core_pass_2
+ done
+}
+
+# Build for build the cc facilities
+do_cc_for_build() {
+ for f in ${CT_CC_FACILITY_LIST}; do
+ do_${f}_for_build
+ done
+}
+
+# Build for host the cc facilities
+do_cc_for_host() {
+ for f in ${CT_CC_FACILITY_LIST}; do
+ do_${f}_for_host
+ done
+}