diff options
Diffstat (limited to 'xmake/tools/make.lua')
| -rw-r--r-- | xmake/tools/make.lua | 21 |
1 files changed, 21 insertions, 0 deletions
diff --git a/xmake/tools/make.lua b/xmake/tools/make.lua index 8cab41067..2785eaf73 100644 --- a/xmake/tools/make.lua +++ b/xmake/tools/make.lua @@ -31,6 +31,13 @@ function init(shellname) end +-- get the property +function get(name) + + -- get it + return _g[name] +end + -- run it function run(makefile, target, jobs) @@ -74,3 +81,17 @@ function run(makefile, target, jobs) end end + +-- check the given flags +function check(flags) + + -- make an empty makefile + local tmpfile = os.tmpfile() + io.write(tmpfile, "all:\n") + + -- check it + os.run("%s %s -f %s", _g.shellname, ifelse(flags, flags, ""), tmpfile) + + -- remove this makefile + os.rm(tmpfile) +end |
