Parameterize src dirs everywhere and fix PCRE incs for HAProxy
This commit is contained in:
@@ -1,6 +1,10 @@
|
||||
HAPROXY_REPO_SRC = http://git.haproxy.org/git/haproxy-2.6.git
|
||||
HAPROXY_VERSION = 2.6
|
||||
HAPROXY_REPOSRC = http://git.haproxy.org/git/haproxy-$(HAPROXY_VERSION).git
|
||||
|
||||
HAPROXY_BUILDIR = src
|
||||
HAPROXY_DESTDIR = dist
|
||||
HAPROXY_DESTDIR_ABS = $(shell realpath $(HAPROXY_DESTDIR))
|
||||
HAPROXY_ARCHIVE = haproxy-$(HAPROXY_VERSION)-dist.tar.gz
|
||||
|
||||
DEP_ROOT_LUA = ../deps/lua
|
||||
DEP_ROOT_PCRE2 = ../deps/pcre2
|
||||
@@ -25,7 +29,8 @@ HAPROXY_MAKE_ARGS := DEBUG="-DDEBUG_STRICT -DDEBUG_MEMORY_POOLS" \
|
||||
USE_PCRE2_JIT=1 \
|
||||
USE_STATIC_PCRE2=1 \
|
||||
PCRE2_INC="../$(DEP_ROOT_PCRE2)/dist/include" \
|
||||
PCRE2_LIB="../$(DEP_ROOT_PCRE2)/dist/lib" \
|
||||
PCRE2_LIB="../$(DEP_ROOT_PCRE2)/dist/lib64" \
|
||||
PCRE2_CONFIG="../$(DEP_ROOT_PCRE2)/dist/bin/pcre2-config" \
|
||||
USE_PROMEX=1 \
|
||||
USE_QUIC=1 \
|
||||
USE_SLZ=1 \
|
||||
@@ -34,19 +39,24 @@ HAPROXY_MAKE_ARGS := DEBUG="-DDEBUG_STRICT -DDEBUG_MEMORY_POOLS" \
|
||||
|
||||
all: build $(HAPROXY_DESTDIR)
|
||||
|
||||
src:
|
||||
git clone "$(HAPROXY_REPO_SRC)" src
|
||||
git -C "src" checkout "master"
|
||||
$(HAPROXY_BUILDIR):
|
||||
git clone "$(HAPROXY_REPOSRC)" $(HAPROXY_BUILDIR)
|
||||
git -C "$(HAPROXY_BUILDIR)" checkout "master"
|
||||
|
||||
build: src
|
||||
make -C "src" -j "$(shell nproc)" $(HAPROXY_MAKE_ARGS) opts
|
||||
make -C "src" -j "$(shell nproc)" $(HAPROXY_MAKE_ARGS)
|
||||
build: $(HAPROXY_BUILDIR)
|
||||
make -C "$(HAPROXY_BUILDIR)" -j "$(shell nproc)" $(HAPROXY_MAKE_ARGS) opts
|
||||
make -C "$(HAPROXY_BUILDIR)" -j "$(shell nproc)" $(HAPROXY_MAKE_ARGS)
|
||||
|
||||
$(HAPROXY_DESTDIR):
|
||||
if ! [ -d "$(HAPROXY_DESTDIR)" ]; then mkdir -v "$(HAPROXY_DESTDIR)"; fi
|
||||
$(MAKE) -C "src" -j "$(shell nproc)" DESTDIR="$(HAPROXY_DESTDIR_ABS)" install
|
||||
@if ! [ -d "$(HAPROXY_DESTDIR)" ]; then mkdir -v "$(HAPROXY_DESTDIR)"; fi
|
||||
$(MAKE) -C "$(HAPROXY_BUILDIR)" -j "$(shell nproc)" DESTDIR="$(HAPROXY_DESTDIR_ABS)" install
|
||||
|
||||
$(HAPROXY_ARCHIVE): $(HAPROXY_DESTDIR)
|
||||
tar -C "$(HAPROXY_DESTDIR)" -cjf "$(HAPROXY_ARCHIVE)" "usr"
|
||||
|
||||
clean:
|
||||
git -C "src" clean -fdx
|
||||
rm -rf "$(HAPROXY_BUILDIR)"
|
||||
rm -rf "$(HAPROXY_DESTDIR)"
|
||||
rm -fv "$(HAPROXY_ARCHIVE)"
|
||||
|
||||
.PHONY: clean build $(HAPROXY_DESTDIR)
|
||||
|
||||
Reference in New Issue
Block a user