diff options
Diffstat (limited to 'xmake/modules/package/tools/make.lua')
| -rw-r--r-- | xmake/modules/package/tools/make.lua | 29 |
1 files changed, 28 insertions, 1 deletions
diff --git a/xmake/modules/package/tools/make.lua b/xmake/modules/package/tools/make.lua index 011383366..498feb4fa 100644 --- a/xmake/modules/package/tools/make.lua +++ b/xmake/modules/package/tools/make.lua @@ -97,10 +97,37 @@ function build(package, configs, opt) end end - -- do configure + -- do build if is_host("bsd") then os.vrunv("gmake", argv, {envs = opt.envs or buildenvs(package)}) else os.vrunv("make", argv, {envs = opt.envs or buildenvs(package)}) end end + +-- install package +function install(package, configs) + + -- pass configurations + local argv = {"install"} + if option.get("verbose") then + table.insert(argv, "VERBOSE=1") + end + for name, value in pairs(configs) do + value = tostring(value):trim() + if value ~= "" then + if type(name) == "number" then + table.insert(argv, value) + else + table.insert(argv, name .. "=" .. value) + end + end + end + + -- do install + if is_host("bsd") then + os.vrunv("gmake", argv) + else + os.vrunv("make", argv) + end +end |
