Index: ps/trunk/build/workspaces/update-workspaces.sh =================================================================== --- ps/trunk/build/workspaces/update-workspaces.sh +++ ps/trunk/build/workspaces/update-workspaces.sh @@ -38,6 +38,7 @@ premake_args="" +with_system_premake5=false without_nvtt=false with_system_nvtt=false with_system_mozjs45=false @@ -46,6 +47,7 @@ for i in "$@" do case $i in + --with-system-premake5 ) with_system_premake5=true ;; --without-nvtt ) without_nvtt=true; premake_args="${premake_args} --without-nvtt" ;; --with-system-nvtt ) with_system_nvtt=true; premake_args="${premake_args} --with-system-nvtt" ;; --with-system-mozjs45 ) with_system_mozjs45=true; premake_args="${premake_args} --with-system-mozjs45" ;; @@ -95,22 +97,29 @@ echo fi -# Now build premake and run it to create the makefiles -cd ../premake/premake5 -PREMAKE_BUILD_DIR=build/gmake.unix -# BSD and OS X need different Makefiles -case "`uname -s`" in - "GNU/kFreeBSD" ) - # use default gmake.unix (needs -ldl as we have a GNU userland and libc) - ;; - *"BSD" ) - PREMAKE_BUILD_DIR=build/gmake.bsd - ;; - "Darwin" ) - PREMAKE_BUILD_DIR=build/gmake.macosx - ;; -esac -${MAKE} -C $PREMAKE_BUILD_DIR ${JOBS} || die "Premake build failed" +# Now run premake to create the makefiles + +premake_command="premake5" +if [ "$with_system_premake5" = "false" ]; then + # Build bundled premake + cd ../premake/premake5 + PREMAKE_BUILD_DIR=build/gmake.unix + # BSD and OS X need different Makefiles + case "`uname -s`" in + "GNU/kFreeBSD" ) + # use default gmake.unix (needs -ldl as we have a GNU userland and libc) + ;; + *"BSD" ) + PREMAKE_BUILD_DIR=build/gmake.bsd + ;; + "Darwin" ) + PREMAKE_BUILD_DIR=build/gmake.macosx + ;; + esac + ${MAKE} -C $PREMAKE_BUILD_DIR ${JOBS} || die "Premake build failed" + + premake_command="premake5/bin/release/premake5" +fi echo @@ -121,11 +130,11 @@ echo "Premake args: ${premake_args}" if [ "`uname -s`" != "Darwin" ]; then - premake5/bin/release/premake5 --file="premake5.lua" --outpath="../workspaces/gcc/" ${premake_args} gmake || die "Premake failed" + ${premake_command} --file="premake5.lua" --outpath="../workspaces/gcc/" ${premake_args} gmake || die "Premake failed" else - premake5/bin/release/premake5 --file="premake5.lua" --outpath="../workspaces/gcc/" --macosx-version-min="${MIN_OSX_VERSION}" ${premake_args} gmake || die "Premake failed" + ${premake_command} --file="premake5.lua" --outpath="../workspaces/gcc/" --macosx-version-min="${MIN_OSX_VERSION}" ${premake_args} gmake || die "Premake failed" # Also generate xcode workspaces if on OS X - premake5/bin/release/premake5 --file="premake5.lua" --outpath="../workspaces/xcode4" --macosx-version-min="${MIN_OSX_VERSION}" ${premake_args} xcode4 || die "Premake failed" + ${premake_command} --file="premake5.lua" --outpath="../workspaces/xcode4" --macosx-version-min="${MIN_OSX_VERSION}" ${premake_args} xcode4 || die "Premake failed" fi # test_root.cpp gets generated by cxxtestgen and passing different arguments to premake could require a regeneration of this file.