Diff options
| author | Bryce Kwon <bryce@brycekwon.com> | |
|---|---|---|
| committer | Bryce Kwon <bryce@brycekwon.com> | |
| commit | ||
| parent | ||
| tree | ||
| download | ||
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.
| -rw-r--r-- | README.txt | 9 | |
| -rwxr-xr-x | tools/build-release.sh | 26 |
2 files changed, 15 insertions, 20 deletions
@@ -340,12 +340,13 @@ memcheck, and --valgrind=<tool> under another tool. The trash directories need a local filesystem, as the cache tests rely on flock locks, which NFS can only emulate. -make test builds with the flags on its own command line, so after -tools/build-development.sh a plain make test would rebuild and test an ordinary -binary. Have the script run the suite instead, as it passes its arguments on to -make. +make test builds with the flags on its own command line, so after either build +script in tools/ a plain make test would rebuild and test an ordinary binary. +Have the script run the suite instead, as both pass their arguments on to make, +after the lua that build-release.sh takes first. $ ./tools/build-development.sh test + $ ./tools/build-release.sh lua test The suite needs perl and a POSIX shell. Tests that need more are skipped where the tool is missing. These are tidy 5 or later, strace with the file class of 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" |
