summaryrefslogtreecommitdiff
path: root/xmake/modules/package/tools/make.lua
diff options
context:
space:
mode:
authorÂngelo Andrade Cirino <[email protected]>2021-07-15 23:23:48 -0300
committerÂngelo Andrade Cirino <[email protected]>2021-07-15 23:23:48 -0300
commit81ad292ea67f82d88d785a37d23b1f1603996da1 (patch)
tree817b50173948547f7e4b491da271918c67b8a5ff /xmake/modules/package/tools/make.lua
parent942c32f448d9b8a850438aa2af1de2415b7ae872 (diff)
parent8c1141aba414c07554179cb28687124514f6e770 (diff)
Merge remote-tracking branch 'upstream/master'
Diffstat (limited to 'xmake/modules/package/tools/make.lua')
-rw-r--r--xmake/modules/package/tools/make.lua19
1 files changed, 4 insertions, 15 deletions
diff --git a/xmake/modules/package/tools/make.lua b/xmake/modules/package/tools/make.lua
index 0075ab723..b236b9da6 100644
--- a/xmake/modules/package/tools/make.lua
+++ b/xmake/modules/package/tools/make.lua
@@ -85,7 +85,7 @@ function build(package, configs, opt)
opt = opt or {}
-- pass configurations
- local njob = tostring(math.ceil(os.cpuinfo().ncpu * 3 / 2))
+ local njob = opt.jobs or option.get("jobs") or tostring(math.ceil(os.cpuinfo().ncpu * 3 / 2))
local argv = {"-j" .. njob}
if option.get("verbose") then
table.insert(argv, "VERBOSE=1")
@@ -112,26 +112,15 @@ end
-- install package
function install(package, configs, opt)
- -- init options
+ -- do build
opt = opt or {}
+ build(package, configs, opt)
- -- pass configurations
+ -- do install
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, {envs = opt.envs or buildenvs(package)})
else