1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
#!/usr/bin/env bash
set -eu
set -o pipefail
# Builds the following binaries:
# * luacheck (Linux x86-64)
# * luacheck32 (Linux x86)
# * luacheck.exe (Windows x86-64)
# * luacheck32.exe (Windows x86)
# Should be executed from root Luacheck directory.
# Resulting binaries will be in `build/bin/`.
cd build
make fetch
function build {
label="$1"
shift
echo
echo "=== Building Luacheck ($label) ==="
echo
make clean "$@"
make "-j$(nproc)" "$@"
}
build "Linux x86-64" LINUX=1
#build "Linux x86" LINUX=1 "BASE_CC=gcc -m32" SUFFIX=32
build "Windows x86-64" CROSS=x86_64-w64-mingw32- SUFFIX=.exe
build "Windows x86" CROSS=i686-w64-mingw32- SUFFIX=32.exe
|