File: build-vtest.sh

package info (click to toggle)
haproxy 3.0.11-1
  • links: PTS, VCS
  • area: main
  • in suites: sid, trixie
  • size: 22,184 kB
  • sloc: ansic: 245,604; sh: 3,343; xml: 1,756; python: 1,330; makefile: 1,106; perl: 168; cpp: 21
file content (30 lines) | stat: -rwxr-xr-x 922 bytes parent folder | download | duplicates (2)
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
#!/bin/sh

set -eux

curl -fsSL https://github.com/vtest/VTest2/archive/main.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

# 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="-I. -Isrc -Ilib -I/usr/local/include -I/opt/homebrew/include -pthread"
else
   make -j${CPUS} FLAGS="-O2 -s -Wall"
fi