Global cleanup for fully reproducible local build

This commit is contained in:
Tristan
2022-06-06 05:46:20 +01:00
parent 8cc1d4e0db
commit 5971388de4
15 changed files with 208 additions and 161 deletions

27
deps/lua/Makefile vendored Normal file
View File

@ -0,0 +1,27 @@
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_DESTDIR = dist
LUA_DESTDIR_ABS = $(shell realpath $(LUA_DESTDIR))
all: build $(LUA_DESTDIR)
src:
if ! [ -d "src" ]; then mkdir -v "src"; fi
src/lua-$(LUA_VERSION).tar.gz: src
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
$(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)"
clean:
rm -rf "src"
rm -rf "$(LUA_DESTDIR)"
.PHONY: clean build