Page MenuHomeWildfire Games

D4894.diff
No OneTemporary

Size
2 KB
Referenced Files
None
Subscribers
None

D4894.diff

Index: ps/trunk/build/premake/build.sh
===================================================================
--- ps/trunk/build/premake/build.sh
+++ ps/trunk/build/premake/build.sh
@@ -0,0 +1,35 @@
+#!/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
Index: ps/trunk/build/workspaces/update-workspaces.sh
===================================================================
--- ps/trunk/build/workspaces/update-workspaces.sh
+++ ps/trunk/build/workspaces/update-workspaces.sh
@@ -102,30 +102,15 @@
echo
fi
-# Now run premake to create the makefiles
+# Now build Premake or use system's.
cd ../premake
premake_command="premake5"
if [ "$with_system_premake5" = "false" ]; then
# Build bundled premake
- cd premake5
- PREMAKE_BUILD_DIR=build/gmake2.unix
- # BSD and OS X need different Makefiles
- case "`uname -s`" in
- "GNU/kFreeBSD" )
- # use default gmake2.unix (needs -ldl as we have a GNU userland and libc)
- ;;
- *"BSD" )
- PREMAKE_BUILD_DIR=build/gmake2.bsd
- ;;
- "Darwin" )
- PREMAKE_BUILD_DIR=build/gmake2.macosx
- ;;
- esac
- ${MAKE} -C $PREMAKE_BUILD_DIR ${JOBS} || die "Premake build failed"
+ MAKE=${MAKE} JOBS=${JOBS} ./build.sh || die "Premake 5 build failed"
- cd ..
premake_command="premake5/bin/release/premake5"
fi
@@ -133,7 +118,7 @@
# If we're in bash then make HOSTTYPE available to Premake, for primitive arch-detection
export HOSTTYPE="$HOSTTYPE"
-
+# Now run Premake to create the makefiles
echo "Premake args: ${premake_args}"
if [ "`uname -s`" != "Darwin" ]; then
${premake_command} --file="premake5.lua" --outpath="../workspaces/gcc/" ${premake_args} gmake || die "Premake failed"

File Metadata

Mime Type
text/plain
Expires
Thu, Sep 19, 10:57 PM (4 h, 56 m)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
3368570
Default Alt Text
D4894.diff (2 KB)

Event Timeline