From 4aca8c030312e30e72cdcabe1b575090f302bd18 Mon Sep 17 00:00:00 2001 From: Bryce Kwon Date: Sat, 7 Nov 2026 17:11:28 -1000 Subject: Pass further release build arguments on to make The release build took lua alone, so its binary could not be tested as built, and a Mac without pkg-config could not name LuaJIT for it. --- tools/build-release.sh | 26 ++++++++++---------------- 1 file changed, 10 insertions(+), 16 deletions(-) (limited to 'tools/build-release.sh') diff --git a/tools/build-release.sh b/tools/build-release.sh index b5e6faa..bbfb3b4 100755 --- a/tools/build-release.sh +++ b/tools/build-release.sh @@ -7,26 +7,20 @@ # so the binary needs no Lua at runtime, and running it as # ./tools/build-release.sh lua links in the backend behind the "lua:" filter # prefix instead, which needs a Lua dev package installed. +# +# Any further arguments go on to make, so the suite can test the binary as +# built, and the Lua flags can be given where pkg-config cannot find Lua: +# +# ./tools/build-release.sh lua LUA_PKGCONFIG=luajit test set -eu -if test "$#" -gt 1 +lua=NO_LUA=1 +if test "${1:-}" = lua then - echo "usage: $0 [lua]" >&2 - exit 2 + lua= + shift fi -case "${1:-}" in -"") - set -- NO_LUA=1 - ;; -lua) - set -- - ;; -*) - echo "$0: unknown argument \"$1\", expected \"lua\" or nothing" >&2 - exit 2 - ;; -esac cd "$(dirname "$0")/.." @@ -97,5 +91,5 @@ CGIT_EXTRA_CFLAGS="-Wformat -Wformat-security -Werror=format-security" # which would override the one from the environment the flags were probed # with. make cleanall -make "$@" CC="$CC" CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" \ +make $lua "$@" CC="$CC" CFLAGS="$CFLAGS" LDFLAGS="$LDFLAGS" \ CGIT_EXTRA_CFLAGS="$CGIT_EXTRA_CFLAGS" -- cgit 2.12.1