From 1a5ac25f6108ffb46058c68fda9f53ce97610d9a Mon Sep 17 00:00:00 2001 From: Julian Sikorski Date: Wed, 5 Feb 2020 23:21:10 +0100 Subject: Sync with GENie upstream revision ce9f3c5 (#6262) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * Change makerules to take variable $(PROJECT_TYPE) instead of hardcoded 'gmake' This allows to run `make projgen PROJECT_TYPE=ninja` to generate ninja build files instead. and to build GENie using ninja by running `make release PROJECT_TYPE=ninja`. Using ninja improves build times, e.g. for macOS: 12.47s with gmake goes down to 2.05s with ninja. Signed-off-by: Julian Sikorski * Set prefer project set as solution.startproject as default target Signed-off-by: Julian Sikorski * Adding `GenerateMapFiles` flag. Causes Visual Studio's linker to generate .map files for that configuration. Signed-off-by: Julian Sikorski * Add ninja support for 'wholearchive' libraries Signed-off-by: Julian Sikorski * Fixup ninja.esc to gracefully ignore nil passed as value Signed-off-by: Julian Sikorski * Use -Wl,-force_load for wholearchive libs when building for macosx Signed-off-by: Julian Sikorski * Updated README. Signed-off-by: Julian Sikorski * Add space after filename in 'Generating' message This makes the filename 'clickable' to open in iTerm and VSCode Signed-off-by: Julian Sikorski * Print generated filenames as quoted string Signed-off-by: Julian Sikorski * Remove '...' after filename Signed-off-by: Julian Sikorski * Pop cwd after pushing to run file Signed-off-by: Julian Sikorski * Make paths in embed.lua rely on script dir Signed-off-by: Julian Sikorski * Updated README. Signed-off-by: Julian Sikorski * Fix issues caused by make-4.3 no longer adding spaces to variables in some cases The fix was found by @asavah. Signed-off-by: Julian Sikorski * Fixed release script. Signed-off-by: Julian Sikorski * Updated README. Signed-off-by: Julian Sikorski * Update scripts.c Co-authored-by: Christian Helmich Co-authored-by: Johan Sköld Co-authored-by: Бранимир Караџић --- 3rdparty/genie/scripts/embed.lua | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to '3rdparty/genie/scripts/embed.lua') diff --git a/3rdparty/genie/scripts/embed.lua b/3rdparty/genie/scripts/embed.lua index 05165923c16..39703b1dd4a 100644 --- a/3rdparty/genie/scripts/embed.lua +++ b/3rdparty/genie/scripts/embed.lua @@ -5,6 +5,8 @@ -- issues in Mac OS X Universal builds. -- + local scriptdir = path.getdirectory(_SCRIPT) + local function stripfile(fname) local f = io.open(fname) local s = assert(f:read("*a")) @@ -73,13 +75,13 @@ function doembed() -- load the manifest of script files - scripts = dofile("../src/_manifest.lua") + scripts = dofile(path.join(scriptdir, "../src/_manifest.lua")) -- main script always goes at the end table.insert(scripts, "_premake_main.lua") -- open scripts.c and write the file header - local out = io.open("../src/host/scripts.c", "w+b") + local out = io.open(path.join(scriptdir, "../src/host/scripts.c"), "w+b") out:write("/* Premake's Lua scripts, as static data buffers for release mode builds */\n") out:write("/* DO NOT EDIT - this file is autogenerated - see BUILD.txt */\n") out:write("/* To regenerate this file, run: premake4 embed */ \n\n") @@ -87,7 +89,7 @@ for i,fn in ipairs(scripts) do print(fn) - local s = stripfile("../src/" .. fn) + local s = stripfile(path.join(scriptdir,"../src/" .. fn)) writefile(out, fn, s) end -- cgit v1.2.3-70-g09d2