-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathbuildenv
56 lines (47 loc) · 1.49 KB
/
buildenv
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
# bump: m4-version /M4_VERSION="(.*)"/ https://ftp.gnu.org/gnu/m4/|re:/m4-([\d.]+).tar.gz/$1/|semver:*
M4_VERSION="1.4.19"
export ZOPEN_BUILD_LINE="STABLE"
export ZOPEN_STABLE_URL="https://ftp.gnu.org/gnu/m4/m4-${M4_VERSION}.tar.gz"
export ZOPEN_STABLE_DEPS="curl gzip make m4"
export ZOPEN_DEV_URL="git://git.savannah.gnu.org/m4.git"
export ZOPEN_DEV_DEPS="check_clang git make m4 help2man perl texinfo xz autoconf automake gettext rsync patch gzip tar gperf sed grep libtool autoconf zoslib"
export ZOPEN_DEV_BRANCH="branch-1.4"
zopen_post_buildenv()
{
export ZOPEN_EXTRA_LDFLAGS=""
if [ "${ZOPEN_BUILD_LINE}x" = "STABLEx" ]; then
export ZOPEN_BOOTSTRAP=skip
# -std=c11 required for max_align_t typedef in stddef.h
export ZOPEN_EXTRA_CFLAGS="-std=c11 -fgnu89-inline -I\${ZOPEN_ROOT}/m4/lib -I\${ZOPEN_ROOT}/patches/PR1/include"
else
export ZOPEN_COMP=CLANG
fi
}
zopen_append_to_env()
{
cat <<ZZ
if [ ! -z "\$ZOPEN_IN_ZOPEN_BUILD" ]; then
#
# This is temporary until the autotools are fixed to remove
# hardcoded jenkins paths
#
export M4="\$PWD/bin/m4"
fi
ZZ
}
zopen_get_version()
{
./src/m4 --version | head -1 | awk '{print $4; }'
}
zopen_check_results()
{
chk="$1/$2_check.log"
totalTests=$(cat "${chk}" | grep "^Checking .*" | wc -l)
start_line=$(cat "${chk}" | egrep -n '^Failed checks were:' | awk -F':' '{ print $1 }')
failures=$(cat "${chk}" | tail +${start_line} | head -2 | tail -1 | wc -w)
cat <<ZZ
actualFailures:$failures
totalTests:$totalTests
expectedFailures:4
ZZ
}