summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--xmake/modules/package/tools/make.lua20
-rw-r--r--xmake/modules/private/xrepo/action/install.lua1
2 files changed, 5 insertions, 16 deletions
diff --git a/xmake/modules/package/tools/make.lua b/xmake/modules/package/tools/make.lua
index 57e9b631e..b236b9da6 100644
--- a/xmake/modules/package/tools/make.lua
+++ b/xmake/modules/package/tools/make.lua
@@ -112,27 +112,15 @@ end
-- install package
function install(package, configs, opt)
- -- init options
+ -- do build
opt = opt or {}
+ build(package, configs, opt)
- -- pass configurations
- local njob = opt.jobs or option.get("jobs") or tostring(math.ceil(os.cpuinfo().ncpu * 3 / 2))
- local argv = {"install", "-j" .. njob}
+ -- 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
diff --git a/xmake/modules/private/xrepo/action/install.lua b/xmake/modules/private/xrepo/action/install.lua
index 2f63b0e5d..3b9032689 100644
--- a/xmake/modules/private/xrepo/action/install.lua
+++ b/xmake/modules/private/xrepo/action/install.lua
@@ -180,6 +180,7 @@ function _install_packages(packages)
table.insert(require_argv, "-D")
end
if option.get("jobs") then
+ table.insert(require_argv, "-j")
table.insert(require_argv, option.get("jobs"))
end
if option.get("force") then