diff --git a/build/premake/premake5.lua b/build/premake/premake5.lua index 4154560eb6..b86e00a9d1 100644 --- a/build/premake/premake5.lua +++ b/build/premake/premake5.lua @@ -1,12 +1,44 @@ local semver = require("semver") -if (semver("5.0.0-beta5") <= semver(_PREMAKE_VERSION)) then - print("Using premake " .. _PREMAKE_VERSION .. "...") -else +print("Premake version: " .. _PREMAKE_VERSION) +if (semver(_PREMAKE_VERSION) < semver("5.0.0-beta5")) then print("Requires Premake 5.0.0-beta5 or later") + print("Aborting") os.exit(1) end +local function print_options() + local options = "" + local tkeys = {} + for key,_ in pairs(_OPTIONS) do table.insert(tkeys, key) end + table.sort(tkeys) + for _,key in pairs(tkeys) do + local value = _OPTIONS[key] + options = options .. " --" .. key + if (value and value ~= "") then + options = options .. "=" .. value + end + end + print("Premake options:" .. options) +end +print_options() +print("") + +print("--------------------------------------------------------------------------------") +print("Environment") +print("") +print("AR : " .. (os.getenv("AR") or "unset")) +print("CC : " .. (os.getenv("CC") or "unset")) +print("CXX : " .. (os.getenv("CXX") or "unset")) +print("HOSTTYPE : " .. (os.getenv("HOSTTYPE") or "unset")) +print("PKG_CONFIG : " .. (os.getenv("PKG_CONFIG") or "unset")) +print("") +print("CFLAGS : " .. (os.getenv("CFLAGS") or "unset")) +print("CXXFLAGS : " .. (os.getenv("CXXFLAGS") or "unset")) +print("LDFLAGS : " .. (os.getenv("LDFLAGS") or "unset")) +print("--------------------------------------------------------------------------------") +print("") + newoption { category = "Pyrogenesis", trigger = "android", description = "Use non-working Android cross-compiling mode" } newoption { category = "Pyrogenesis", trigger = "coverage", description = "Enable code coverage data collection (GCC only)" } newoption { category = "Pyrogenesis", trigger = "gles", description = "Use non-working OpenGL ES 2.0 mode" } diff --git a/build/workspaces/update-workspaces.sh b/build/workspaces/update-workspaces.sh index c5a5fb89cd..1e1564ce79 100755 --- a/build/workspaces/update-workspaces.sh +++ b/build/workspaces/update-workspaces.sh @@ -40,12 +40,9 @@ if [ "$with_system_premake5" = "false" ]; then premake_command="../../libraries/source/premake-core/bin/premake5" fi -echo - # 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 [ "$OS" != "Darwin" ]; then # shellcheck disable=SC2086 ${premake_command} --file="premake5.lua" --outpath="../workspaces/gcc/" ${premake_args} gmake || die "Premake failed"