-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbuildenv
More file actions
184 lines (141 loc) · 6.53 KB
/
buildenv
File metadata and controls
184 lines (141 loc) · 6.53 KB
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
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
# Update bump details accordingly. Use bump check to confirm.
# bump: mimalloc-version /MIMALLOC_VERSION="(.*)"/ https://github.com/microsoft/mimalloc.git|re:/(^\s*2\.[0-9.]+)/$1/|semver:*
MIMALLOC_VERSION="2.2.3" # Specify a stable release
export ZOPEN_STABLE_TAG="v${MIMALLOC_VERSION}"
###
### Build control file for the mimalloc port
###
###
### Required Environment Variables
###
## Specify the default build line, either 'DEV' or 'STABLE' (default: STABLE)
export ZOPEN_BUILD_LINE="STABLE"
## Required IF ZOPEN_BUILD_LINE='STABLE'
export ZOPEN_STABLE_URL="https://github.com/microsoft/mimalloc.git" # Specify the stable build URL (either git or tarball)
export ZOPEN_STABLE_DEPS="cmake make zoslib" # Specify the stable build dependencies.
## Required IF ZOPEN_BUILD_LINE='DEV'
export ZOPEN_DEV_URL="https://github.com/microsoft/mimalloc.git" # Specify the dev build URL
export ZOPEN_DEV_DEPS="cmake make zoslib" # Specify the dev build dependencies
## Specify a space-delimited list of applicable categories.
## See tool_categories.txt for valid options
export ZOPEN_CATEGORIES="library"
## Runtime zopen tool dependencies to be installed alongside the tool.
export ZOPEN_RUNTIME_DEPS=""
## Runtime system prerequisites; supply the name of the system pre-requisties.
## Current available prerequisites: zos24 zos25 zos31 procfs (see https://github.com/zopencommunity/meta/blob/main/include/prereq.sh for a current list)
export ZOPEN_SYSTEM_PREREQ=""
###
### Build stage control environment variables
###
#export ZOPEN_BOOTSTRAP="skip" ## Bootstrap program to run (defaults to './bootstrap')
#export ZOPEN_CHECK="skip" ## Check program to run (defaults to 'make')
#export ZOPEN_INSTALL="skip" ## Installation program to run (defaults to 'make')
#export ZOPEN_MAKE="skip" ## Build program to run (defaults to 'make')
#export ZOPEN_CLEAN="" ## Clean up program to run (defaults to 'make')
export ZOPEN_CONFIGURE="cmake"
export ZOPEN_CONFIGURE_OPTS="-B ../build --install-prefix \$ZOPEN_INSTALL_DIR/ -DBUILD_TESTING=ON -DENABLE_STATIC_INIT=ON -DCMAKE_INSTALL_PREFIX=\$ZOPEN_INSTALL_DIR/ -DCMAKE_VERBOSE_MAKEFILE:BOOL=ON ."
export ZOPEN_MAKE="cmake"
export ZOPEN_MAKE_OPTS=" --build ../build --parallel \$ZOPEN_NUM_JOBS --target all"
export ZOPEN_CHECK_OPTS="-C ../build test"
export ZOPEN_INSTALL="cmake"
export ZOPEN_INSTALL_OPTS="--install ../build"
###
### Required user-supplied functions
###
zopen_check_results()
{
dir="$1"
pfx="$2"
chk="$1/$2_check.log"
# Echo the following information to gauge build health
echo "actualFailures:0"
echo "totalTests:1"
echo "expectedFailures:0"
echo "expectedTotalTests:1"
}
zopen_get_version()
{
# Modify to echo the version of your tool/library
# Rather than hardcoding the version, obtain the version by running the tool/library
echo "1.0.0"
}
###
### Optional user-supplied functions for zopen-build
###
#zopen_append_to_env() {
## This function runs as part of generation of the .env file. The output of the
## function is appended to .env.
#}
#zopen_append_to_setup(){
## This function runs as part of generation of the setup.sh file. The output of
## the function is appended to setup.sh.
#}
#zopen_append_to_validate_install(){
## This function runs as part of generation of the install_test.sh file. The
## output of the function is appended to install_test.sh script.
#}
#zopen_install_caveats(){
## This function is run post install. All stdout messages are captured and
## added to the metadata.json as installation caveats.
#}
#zopen_append_to_zoslib_env(){
## This function runs as part of generation of the C function zoslib_env_hook,
## which can be used to set environment variables before main is run.
#}
#zopen_init(){
## This function runs after code is downloaded and patched but before the code
## is built.
#}
#zopen_post_buildenv(){
## This function runs after the 'buildenv' is processed.
#}
#zopen_pre_build(){
## This function runs before the 'make' step of the build is run.
#}
#zopen_pre_check(){
## This function runs before the 'check' step of the build is run.
#}
#zopen_pre_configure(){
## This function runs before the 'configure' step of the build is run.
#}
#zopen_pre_install(){
## This function runs before the 'install' step of the build is run.
#}
#zopen_post_install(){
## This function runs after the 'install' step of the build is run.
#}
#zopen_pre_patch(){
## This function runs before the 'patch' step of the build is run.
#}
#zopen_pre_terminate(){
## This function runs before 'zopen build' terminates.
#}
###
### Optional build control variables
###
#export ZOPEN_EXTRA_CFLAGS="" ## C compiler flags to append to CFLAGS (defaults to '').
#export ZOPEN_EXTRA_CPPFLAGS="" ## C,C++ pre-processor flags to append to CPPFLAGS (defaults to '')
#export ZOPEN_EXTRA_CXXFLAGS="" ## C++ compiler flags to append to CXXFLAGS (defaults to '')
#export ZOPEN_EXTRA_LDFLAGS="" ## C,C++ linker flags to append to LDFLAGS (defaults to '')
#export ZOPEN_EXTRA_LIBS="" ## C,C++ libraries to append to LIBS (defaults to '')
#export ZOPEN_BOOTSTRAP_OPTS="" ## Options to pass to bootstrap program (defaults to '')
#export ZOPEN_CHECK_MINIMAL="" ## Check program will not be passed CFLAGS, LDFLAGS, CPPFLAGS options but will get them from env vars.
#export ZOPEN_CHECK_OPTS="" ## Options to pass to check program (defaults to 'check')
#export ZOPEN_CHECK_TIMEOUT="" ## Timeout limit in seconds for the check program (defaults to '12600' # 3.5 hours)
#export ZOPEN_CLEAN_OPTS="" ## Options to pass to clean up program (defaults to 'clean')
#export ZOPEN_CONFIGURE_MINIMAL="" ## Configuration program will not be passed CFLAGS, LDFLAGS, CPPFLAGS options but will get them from env vars.
#export ZOPEN_CONFIGURE_OPTS="" ## Options to pass to configuration program (defaults to '--prefix=')
#export ZOPEN_EXTRA_CONFIGURE_OPTS="" ## Extra configure options to pass to configuration program. (defaults to '')
#export ZOPEN_INSTALL_OPTS="" ## Options to pass to installation program (defaults to 'install')
#export ZOPEN_MAKE_MINIMAL="" ## Build program will not be passed CFLAGS, LDFLAGS, CPPFLAGS options but will get them from env vars.
#export ZOPEN_MAKE_OPTS="" ## Options to pass to build program (defaults to '-j')
#export ZOPEN_PATCH_DIR="" ## Specify directory from which patches should be applied.
###
### Restricted Usage - only set in ports if necessary
###
## Don't add zoslib as a dependency; most ports should keep this unset
#export ZOPEN_DONT_ADD_ZOSLIB_DEP=1
###
### Additional user-defined custom code - runs during script source
###
## Add user-defined functions and code