forked from adoptium/temurin-build
-
Notifications
You must be signed in to change notification settings - Fork 2
/
makejdk-any-platform.sh
executable file
·61 lines (50 loc) · 2.09 KB
/
makejdk-any-platform.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
#!/bin/bash
################################################################################
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
################################################################################
################################################################################
#
# Entry point to build (Adopt) OpenJDK binaries for any platform.
#
# 1. Source scripts to support configuration, docker builds and native builds.
# 2. Parse the Command Line Args
# 3. Set a host of configuration options based on args, platform etc
# 4. Display and then persist those configuration options
# 5. Build the binary in Docker or natively
#
################################################################################
set -eu
# i.e. Where we are
SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
# Pull in configuration and build support
# shellcheck source=sbin/common/config_init.sh
source "${SCRIPT_DIR}/sbin/common/config_init.sh"
# shellcheck source=docker-build.sh
source "${SCRIPT_DIR}/docker-build.sh"
# shellcheck source=native-build.sh
source "${SCRIPT_DIR}/native-build.sh"
# shellcheck source=configureBuild.sh
source "${SCRIPT_DIR}/configureBuild.sh"
echo "Starting $0 to configure, build (Adopt)OpenJDK binary"
# Configure the build, display the parameters and write the config to disk
# see ${SCRIPT_DIR}/sbin/common/config_init.sh for details
configure_build "$@"
writeConfigToFile
# Let's build and test the (Adopt) OpenJDK binary in Docker or natively
if [ "${BUILD_CONFIG[USE_DOCKER]}" == "true" ] ; then
buildOpenJDKViaDocker
else
buildOpenJDKInNativeEnvironment
fi