diff options
| author | ruki <[email protected]> | 2022-09-13 23:41:27 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2022-09-13 23:41:27 +0800 |
| commit | fcaad7a606e45a64ceb6eb5236b6d751b5801c0f (patch) | |
| tree | f1184af3a070cb8aef7d7c8db93cff544bcb3c7d /xmake/modules | |
| parent | 1bf418b749afd4abaeaf36574569e6ac4fc4b8d9 (diff) | |
support os.execv with {shell = true}
Diffstat (limited to 'xmake/modules')
| -rw-r--r-- | xmake/modules/package/tools/autoconf.lua | 8 | ||||
| -rw-r--r-- | xmake/modules/private/action/trybuild/autotools.lua | 6 |
2 files changed, 7 insertions, 7 deletions
diff --git a/xmake/modules/package/tools/autoconf.lua b/xmake/modules/package/tools/autoconf.lua index 216b05f1b..b8429e9f5 100644 --- a/xmake/modules/package/tools/autoconf.lua +++ b/xmake/modules/package/tools/autoconf.lua @@ -392,16 +392,16 @@ function configure(package, configs, opt) -- generate configure file if not os.isfile("configure") then if os.isfile("autogen.sh") then - os.vrunv("sh", {"./autogen.sh"}, {envs = autogen_envs(package, opt)}) + os.vrunv("./autogen.sh", {}, {shell = true, envs = autogen_envs(package, opt)}) elseif os.isfile("configure.ac") or os.isfile("configure.in") then local autoreconf = find_tool("autoreconf") assert(autoreconf, "autoreconf not found!") - os.vrunv("sh", {autoreconf.program, "--install", "--symlink"}, {envs = autogen_envs(package, opt)}) + os.vrunv(autoreconf.program, {"--install", "--symlink"}, {shell = true, envs = autogen_envs(package, opt)}) end end -- pass configurations - local argv = {"./configure"} + local argv = {} for name, value in pairs(_get_configs(package, configs)) do value = tostring(value):trim() if value ~= "" then @@ -414,7 +414,7 @@ function configure(package, configs, opt) end -- do configure - os.vrunv("sh", argv, {envs = envs}) + os.vrunv("./configure", argv, {shell = true, envs = envs}) end -- do make diff --git a/xmake/modules/private/action/trybuild/autotools.lua b/xmake/modules/private/action/trybuild/autotools.lua index fe484c98e..bacd24a04 100644 --- a/xmake/modules/private/action/trybuild/autotools.lua +++ b/xmake/modules/private/action/trybuild/autotools.lua @@ -220,18 +220,18 @@ function build() -- generate configure if not os.isfile("configure") then if os.isfile("autogen.sh") then - os.vexecv("sh", {"./autogen.sh"}) + os.vexecv("./autogen.sh", {}, {shell = true}) elseif os.isfile("configure.ac") or os.isfile("configure.in") then local autoreconf = find_tool("autoreconf") assert(autoreconf, "autoreconf not found!") - os.vexecv("sh", {autoreconf.program, "--install", "--symlink"}) + os.vexecv(autoreconf.program, {"--install", "--symlink"}, {shell = true}) end end -- do configure local configfile = find_file("[mM]akefile", os.curdir()) if not configfile or os.mtime(config.filepath()) > os.mtime(configfile) then - os.vexecv("sh", table.join("./configure", _get_configs(artifacts_dir)), {envs = _get_buildenvs()}) + os.vexecv("./configure", _get_configs(artifacts_dir), {shell = true, envs = _get_buildenvs()}) end -- do build |
