summaryrefslogtreecommitdiff
path: root/xmake/core/project/task.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2016-03-20 21:15:49 +0800
committerruki <[email protected]>2016-03-20 21:15:49 +0800
commitf0623bf26279430deb6799b7816fb61996120166 (patch)
tree3e438f82500bac072167c5208ec02c0aafa74d54 /xmake/core/project/task.lua
parentc240d9bfda967e986237110d4706db567afd8415 (diff)
add filter for io print
Diffstat (limited to 'xmake/core/project/task.lua')
-rw-r--r--xmake/core/project/task.lua31
1 files changed, 18 insertions, 13 deletions
diff --git a/xmake/core/project/task.lua b/xmake/core/project/task.lua
index b7b7e9c2a..b4664e66a 100644
--- a/xmake/core/project/task.lua
+++ b/xmake/core/project/task.lua
@@ -78,20 +78,25 @@ function task._interpreter()
-- check
assert(variable)
- -- init maps
- local maps =
- {
- host = xmake._HOST
- , tmpdir = os.tmpdir()
- , curdir = os.curdir()
- , globaldir = global.directory()
- , configdir = config.directory()
- , projectdir = xmake._PROJECT_DIR
- , buildir = config.get("buildir")
- }
+ -- attempt to get it directly from the configure
+ local result = config.get(variable)
+ if not result or type(result) ~= "string" then
- -- map it
- result = maps[variable]
+ -- init maps
+ local maps =
+ {
+ host = xmake._HOST
+ , tmpdir = os.tmpdir()
+ , curdir = os.curdir()
+ , globaldir = global.directory()
+ , configdir = config.directory()
+ , projectdir = xmake._PROJECT_DIR
+ }
+
+ -- map it
+ result = maps[variable]
+
+ end
-- ok?
return result