Ralph Sennhauser
abdda50892
This updates shell scripts to use a consistent style that can be enforced via pre-commit hook. As for choosing tabs over spaces, some arguments are: - tabs can help people with visual impairment - tabs allow for indenting heredocs in bash - tabs are the default for the tool shfmt Signed-off-by: Ralph Sennhauser <ralph.sennhauser@gmail.com>
35 lines
807 B
Bash
Executable File
35 lines
807 B
Bash
Executable File
#!/bin/sh
|
|
set -e
|
|
|
|
LIB_VERSION="premake-5-alpha-14+wildfiregames.1"
|
|
|
|
if [ -e .already-built ] && [ "$(cat .already-built)" = "${LIB_VERSION}" ]; then
|
|
echo "Premake 5 is already up to date."
|
|
exit
|
|
fi
|
|
|
|
JOBS=${JOBS:="-j2"}
|
|
MAKE=${MAKE:="make"}
|
|
CFLAGS="${CFLAGS:=""} -Wno-error=implicit-function-declaration"
|
|
OS="${OS:=$(uname -s)}"
|
|
|
|
echo "Building Premake 5..."
|
|
echo
|
|
|
|
PREMAKE_BUILD_DIR=premake5/build/gmake2.unix
|
|
# BSD and OS X need different Makefiles
|
|
case "$OS" in
|
|
"GNU/kFreeBSD")
|
|
# use default gmake2.unix (needs -ldl as we have a GNU userland and libc)
|
|
;;
|
|
*"BSD")
|
|
PREMAKE_BUILD_DIR=premake5/build/gmake2.bsd
|
|
;;
|
|
"Darwin")
|
|
PREMAKE_BUILD_DIR=premake5/build/gmake2.macosx
|
|
;;
|
|
esac
|
|
${MAKE} -C "${PREMAKE_BUILD_DIR}" "${JOBS}" CFLAGS="$CFLAGS" config=release
|
|
|
|
echo "${LIB_VERSION}" >.already-built
|