diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-03 05:11:10 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-06-03 05:11:10 +0000 |
commit | cff6d757e3ba609c08ef2aaa00f07e53551e5bf6 (patch) | |
tree | 08c4fc3255483ad397d712edb4214ded49149fd9 /scripts/build-vtest.sh | |
parent | Adding upstream version 2.9.7. (diff) | |
download | haproxy-cff6d757e3ba609c08ef2aaa00f07e53551e5bf6.tar.xz haproxy-cff6d757e3ba609c08ef2aaa00f07e53551e5bf6.zip |
Adding upstream version 3.0.0.upstream/3.0.0
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'scripts/build-vtest.sh')
-rwxr-xr-x | scripts/build-vtest.sh | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/scripts/build-vtest.sh b/scripts/build-vtest.sh index 4db35d6..9ae4306 100755 --- a/scripts/build-vtest.sh +++ b/scripts/build-vtest.sh @@ -6,5 +6,25 @@ curl -fsSL https://github.com/vtest/VTest/archive/master.tar.gz -o VTest.tar.gz mkdir ../vtest tar xvf VTest.tar.gz -C ../vtest --strip-components=1 # Special flags due to: https://github.com/vtest/VTest/issues/12 -make -C ../vtest FLAGS="-O2 -s -Wall" +# Note: do not use "make -C ../vtest", otherwise MAKEFLAGS contains "w" +# and fails (see Options/Recursion in GNU Make doc, it contains the list +# of options without the leading '-'). +# MFLAGS works on BSD but misses variable definitions on GNU Make. +# Better just avoid the -C and do the cd ourselves then. + +cd ../vtest + +set +e +CPUS=${CPUS:-$(nproc 2>/dev/null)} +CPUS=${CPUS:-1} +set -e + +# +# temporarily detect Apple Silicon (it's using /opt/homebrew instead of /usr/local) +# +if test -f /opt/homebrew/include/pcre2.h; then + make -j${CPUS} FLAGS="-O2 -s -Wall" INCS="-Isrc -Ilib -I/usr/local/include -I/opt/homebrew/include -pthread" +else + make -j${CPUS} FLAGS="-O2 -s -Wall" +fi |