summaryrefslogtreecommitdiff
path: root/xmake/scripts/base/rule.lua
diff options
context:
space:
mode:
authorruki <[email protected]>2015-06-08 14:38:34 +0800
committerruki <[email protected]>2015-06-08 14:38:34 +0800
commitd3258129a4a1ba9886b7e8d773ba8e4ec956b4a6 (patch)
tree23c4c9a6087148c0c65f720fd5e87742429e9108 /xmake/scripts/base/rule.lua
parent4d2fbb049f34e5899d962a148bf5e560fe9d978c (diff)
make switches to configure file
Diffstat (limited to 'xmake/scripts/base/rule.lua')
-rw-r--r--xmake/scripts/base/rule.lua18
1 files changed, 18 insertions, 0 deletions
diff --git a/xmake/scripts/base/rule.lua b/xmake/scripts/base/rule.lua
index 795b7c1ab..6ce441be8 100644
--- a/xmake/scripts/base/rule.lua
+++ b/xmake/scripts/base/rule.lua
@@ -55,6 +55,24 @@ function rule.filename(name, kind)
return format[1] .. name .. format[2]
end
+-- get configure file for the given target
+function rule.configfile(target)
+
+ -- get the target configure file
+ local configfile = target.configfile
+ if configfile then
+ -- translate file path
+ if not path.is_absolute(configfile) then
+ configfile = path.absolute(configfile, xmake._PROJECT_DIR)
+ else
+ configfile = path.translate(configfile)
+ end
+ end
+
+ -- ok?
+ return configfile
+end
+
-- get target file for the given target
function rule.targetfile(target_name, target, buildir)