From 6902984e5c200e03f0d9f4a99d0a0801ee1acabc Mon Sep 17 00:00:00 2001 From: ruki Date: Tue, 20 Nov 2018 22:55:35 +0800 Subject: improve to use xmake to install package --- xmake/modules/package/tools/autoconf.lua | 3 --- xmake/modules/package/tools/xmake.lua | 12 ++---------- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/xmake/modules/package/tools/autoconf.lua b/xmake/modules/package/tools/autoconf.lua index 2958d48fa..8a47bf8de 100644 --- a/xmake/modules/package/tools/autoconf.lua +++ b/xmake/modules/package/tools/autoconf.lua @@ -46,9 +46,6 @@ function install(package, configs) table.insert(argv, value) end else - if value:find(" ", 1, true) then - value = '"' .. value .. '"' - end table.insert(argv, "--" .. name .. "=" .. value) end end diff --git a/xmake/modules/package/tools/xmake.lua b/xmake/modules/package/tools/xmake.lua index 4b625342b..2bb9ba164 100644 --- a/xmake/modules/package/tools/xmake.lua +++ b/xmake/modules/package/tools/xmake.lua @@ -34,22 +34,14 @@ 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 - table.insert(argv, "--" .. name .. "=" .. value) + table.insert(argv, "--" .. name .. "=" .. tostring(value)) end end table.insert(argv, "--mode=" .. (package:debug() and "debug" or "release")) -- inherit require and option configs for name, value in pairs(table.join(package:configs() or {}, configs or {})) do - value = tostring(value) - if value:find(" ", 1, true) then - value = '"' .. value .. '"' - end - table.insert(argv, "--" .. name .. "=" .. value) + table.insert(argv, "--" .. name .. "=" .. tostring(value)) end if option.get("verbose") then table.insert(argv, "-v") -- cgit v1.3.1