Parameterize src dirs everywhere and fix PCRE incs for HAProxy

This commit is contained in:
Tristan
2022-06-06 06:52:47 +01:00
parent 6376218f49
commit 069e156f0c
6 changed files with 72 additions and 49 deletions

20
deps/lua/Makefile vendored
View File

@@ -1,27 +1,29 @@
LUA_VERSION = 5.3.6
LUA_SOURCES = https://www.lua.org/ftp/lua-$(LUA_VERSION).tar.gz
LUA_TARBALL = lua-$(LUA_VERSION).tar.gz
LUA_BUILDIR = src
LUA_DESTDIR = dist
LUA_DESTDIR_ABS = $(shell realpath $(LUA_DESTDIR))
all: build $(LUA_DESTDIR)
all: $(LUA_BUILDIR) $(LUA_DESTDIR)
src:
if ! [ -d "src" ]; then mkdir -v "src"; fi
$(LUA_BUILDIR):
@if ! [ -d "$(LUA_BUILDIR)" ]; then mkdir -v "$(LUA_BUILDIR)"; fi
src/lua-$(LUA_VERSION).tar.gz: src
$(LUA_BUILDIR)/lua-$(LUA_VERSION).tar.gz: $(LUA_BUILDIR)
curl -sSL -o "$(LUA_TARBALL)" "$(LUA_SOURCES)"
build: src/lua-$(LUA_VERSION).tar.gz
tar -C src --strip-components=1 -xf "$(LUA_TARBALL)"
$(MAKE) -C src -j$(shell nproc) linux
build: $(LUA_BUILDIR)/lua-$(LUA_VERSION).tar.gz
tar -C $(LUA_BUILDIR) --strip-components=1 -xf "$(LUA_TARBALL)"
$(MAKE) -C $(LUA_BUILDIR) -j$(shell nproc) linux
$(LUA_DESTDIR): build
if ! [ -d "$(LUA_DESTDIR)" ]; then mkdir -v "$(LUA_DESTDIR)"; fi
$(MAKE) -C src -j$(shell nproc) install INSTALL_TOP="$(LUA_DESTDIR_ABS)"
$(MAKE) -C $(LUA_BUILDIR) -j$(shell nproc) install INSTALL_TOP="$(LUA_DESTDIR_ABS)"
clean:
rm -rf "src"
rm -rf "$(LUA_BUILDIR)"
rm -rf "$(LUA_DESTDIR)"
rm -fv "$(LUA_TARBALL)"
.PHONY: clean build