-
Notifications
You must be signed in to change notification settings - Fork 4
/
build.sh
executable file
·87 lines (70 loc) · 2.23 KB
/
build.sh
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
#!/bin/bash
source `dirname ${BASH_SOURCE[0]}`/config.sh
if [[ "$RUN_BOOTSTRAP" = 1 ]]; then
$ROOT_PATH/.github/scripts/install-dependencies.sh
fi
if [[ "$CCACHE" = 1 ]]; then
source $ROOT_PATH/.github/scripts/enable-ccache.sh
fi
if [[ "$UPDATE_SOURCES" = 1 ]]; then
$ROOT_PATH/.github/scripts/update-sources.sh
fi
if [[ "$APPLY_PATCHES" = 1 ]]; then
case "$PLATFORM" in
*cygwin*)
$ROOT_PATH/.github/scripts/binutils/patch-cygwin.sh 1
$ROOT_PATH/.github/scripts/toolchain/patch-cygwin.sh 1
;;
esac
fi
if [[ "$RUN_BOOTSTRAP" = 1 || "$RESET_SOURCES" = 1 ]]; then
$ROOT_PATH/.github/scripts/install-libraries.sh
fi
if [[ "$CCACHE" = 1 ]]; then
ccache $CCACHE_STATISTICS
fi
$ROOT_PATH/.github/scripts/binutils/build.sh
if [[ "$PLATFORM" =~ linux ]]; then
$ROOT_PATH/.github/scripts/toolchain/install-cross-headers-libs.sh
fi
if [[ "$PLATFORM" =~ (mingw|cygwin) ]]; then
$ROOT_PATH/.github/scripts/toolchain/build-mingw-headers.sh
fi
if [[ "$PLATFORM" =~ cygwin ]]; then
$ROOT_PATH/.github/scripts/toolchain/install-cygwin-headers.sh
fi
if [[ "$BUILD" != "$TARGET" ]]; then
$ROOT_PATH/.github/scripts/toolchain/build-gcc-stage1.sh
fi
if [[ "$PLATFORM" =~ (mingw|cygwin) ]]; then
$ROOT_PATH/.github/scripts/toolchain/build-mingw-crt.sh
fi
if [[ "$PLATFORM" =~ mingw ]]; then
$ROOT_PATH/.github/scripts/toolchain/build-mingw-winpthreads.sh
fi
if [[ "$PLATFORM" =~ cygwin ]]; then
$ROOT_PATH/.github/scripts/toolchain/build-cocom.sh
$ROOT_PATH/.github/scripts/toolchain/build-cygwin.sh 1
fi
if [[ "$APPLY_PATCHES" = 1 ]]; then
case "$PLATFORM" in
*cygwin*)
$ROOT_PATH/.github/scripts/binutils/patch-cygwin.sh 2
$ROOT_PATH/.github/scripts/toolchain/patch-cygwin.sh 2
;;
esac
fi
if [[ "$RUN_BOOTSTRAP" = 1 || "$RESET_SOURCES" = 1 ]]; then
$ROOT_PATH/.github/scripts/install-libraries.sh
fi
$ROOT_PATH/.github/scripts/toolchain/build-gcc.sh
if [[ "$PLATFORM" =~ (mingw|cygwin) ]]; then
$ROOT_PATH/.github/scripts/toolchain/build-mingw.sh
fi
if [[ "$PLATFORM" =~ cygwin ]]; then
$ROOT_PATH/.github/scripts/toolchain/build-cygwin.sh 2
fi
if [[ "$CCACHE" = 1 ]]; then
ccache $CCACHE_STATISTICS
fi
echo 'Success!'