diff options
| author | ruki <[email protected]> | 2018-10-16 22:34:57 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2018-10-16 09:29:47 +0800 |
| commit | e97e34938bdace77ff10dcd933f2af961432949d (patch) | |
| tree | 8ec6dec78b2c575600a1b995462ff0cc49119b72 /xmake/modules/package/tools/xmake.lua | |
| parent | 29598d7ee9489d7383ac2bb4da48264c99539477 (diff) | |
improve tbox templates and package install scripts
Diffstat (limited to 'xmake/modules/package/tools/xmake.lua')
| -rw-r--r-- | xmake/modules/package/tools/xmake.lua | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/xmake/modules/package/tools/xmake.lua b/xmake/modules/package/tools/xmake.lua index 300b3f5e1..6a5772e8f 100644 --- a/xmake/modules/package/tools/xmake.lua +++ b/xmake/modules/package/tools/xmake.lua @@ -34,6 +34,7 @@ function install(package, configs) for _, name in ipairs(names) do local value = get_config(name) if value ~= nil then + value = tostring(value) if value:find(" ", 1, true) then value = '"' .. value .. '"' end @@ -50,7 +51,31 @@ function install(package, configs) end table.insert(argv, "--" .. name .. "=" .. value) end + if option.get("verbose") then + table.insert(argv, "-v") + end + if option.get("backtrace") then + table.insert(argv, "--backtrace") + end + os.vrunv("xmake", argv) + + -- do build + argv = {} + if option.get("verbose") then + table.insert(argv, "-v") + end + if option.get("backtrace") then + table.insert(argv, "--backtrace") + end + os.vrunv("xmake", argv) + + -- do install + argv = {"install", "-y", "-o", package:installdir()} + if option.get("verbose") then + table.insert(argv, "-v") + end + if option.get("backtrace") then + table.insert(argv, "--backtrace") + end os.vrunv("xmake", argv) - os.vrun("xmake" .. (option.get("verbose") and " -v" or "")) - os.vrunv("xmake", {"install", "-o", package:installdir()}) end |
