diff options
| author | ruki <[email protected]> | 2015-06-08 14:38:34 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2015-06-08 14:38:34 +0800 |
| commit | d3258129a4a1ba9886b7e8d773ba8e4ec956b4a6 (patch) | |
| tree | 23c4c9a6087148c0c65f720fd5e87742429e9108 /xmake/scripts/base/rule.lua | |
| parent | 4d2fbb049f34e5899d962a148bf5e560fe9d978c (diff) | |
make switches to configure file
Diffstat (limited to 'xmake/scripts/base/rule.lua')
| -rw-r--r-- | xmake/scripts/base/rule.lua | 18 |
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) |
