From d3bfdfc1d50ebf2ad031b7805cac7590f4bd59ef Mon Sep 17 00:00:00 2001 From: ruki Date: Fri, 9 Oct 2020 23:00:46 +0800 Subject: improve autotools --- xmake/modules/package/tools/autoconf.lua | 4 ++-- xmake/modules/private/action/trybuild/autotools.lua | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/xmake/modules/package/tools/autoconf.lua b/xmake/modules/package/tools/autoconf.lua index 37da6768b..f9c64e44b 100644 --- a/xmake/modules/package/tools/autoconf.lua +++ b/xmake/modules/package/tools/autoconf.lua @@ -153,7 +153,7 @@ function configure(package, configs, opt) end -- pass configurations - local argv = {} + local argv = {"./configure"} for name, value in pairs(_get_configs(package, configs)) do value = tostring(value):trim() if value ~= "" then @@ -166,7 +166,7 @@ function configure(package, configs, opt) end -- do configure - os.vrunv("./configure", argv, {envs = opt.envs or buildenvs(package)}) + os.vrunv("sh", argv, {envs = opt.envs or buildenvs(package)}) end -- install package diff --git a/xmake/modules/private/action/trybuild/autotools.lua b/xmake/modules/private/action/trybuild/autotools.lua index 095d41712..6c35bdbb0 100644 --- a/xmake/modules/private/action/trybuild/autotools.lua +++ b/xmake/modules/private/action/trybuild/autotools.lua @@ -204,7 +204,7 @@ function build() -- do configure local configfile = find_file("[mM]akefile", os.curdir()) if not configfile or os.mtime(config.filepath()) > os.mtime(configfile) then - os.vexecv("./configure", _get_configs(artifacts_dir), {envs = _get_buildenvs()}) + os.vexecv("sh", table.join("./configure", _get_configs(artifacts_dir)), {envs = _get_buildenvs()}) end -- do build -- cgit v1.3.1