Diff options
Diffstat (limited to 'tools')
| -rwxr-xr-x | tools/build-release.sh | 26 |
1 file changed, 10 insertions, 16 deletions
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" |
