summaryrefslogtreecommitdiff
path: root/scripts/build/cc.sh
blob: 0db6b9ce75dcfcf07546bbf89ed47ddb35d4ed70 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
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
}