diff options
Diffstat (limited to '3rdparty/genie/src/actions/make/_make.lua')
-rw-r--r-- | 3rdparty/genie/src/actions/make/_make.lua | 24 |
1 files changed, 23 insertions, 1 deletions
diff --git a/3rdparty/genie/src/actions/make/_make.lua b/3rdparty/genie/src/actions/make/_make.lua index 6392ff46ac6..0f1a4b60519 100644 --- a/3rdparty/genie/src/actions/make/_make.lua +++ b/3rdparty/genie/src/actions/make/_make.lua @@ -33,6 +33,26 @@ end end +-- +-- Escape quoted string so it can be passed as define via command line. +-- + + function _MAKE.escquote(value) + local result + if (type(value) == "table") then + result = { } + for _,v in ipairs(value) do + table.insert(result, _MAKE.escquote(v)) + end + return result + else + -- handle simple replacements + result = value:gsub(" ", "\\ ") + result = result:gsub("\"", "\\\"") + return result + end + end + -- -- Rules for file ops based on the shell type. Can't use defines and $@ because @@ -166,5 +186,7 @@ oncleanproject = function(prj) premake.clean.file(prj, _MAKE.getmakefilename(prj, true)) - end + end, + + gmake = {} } |