diff options
| author | ruki <[email protected]> | 2024-03-09 00:59:54 +0800 |
|---|---|---|
| committer | ruki <[email protected]> | 2024-03-09 00:59:54 +0800 |
| commit | 67dce6e822d59b0722e15c1afe76262f29310f70 (patch) | |
| tree | 46610a8926b27412da4f7ed00f39827ff44c43bd | |
| parent | 7bf30c741e467d22ba72e2a01524b3ca071f552c (diff) | |
improve autoconf.make envs
| -rw-r--r-- | xmake/modules/package/tools/autoconf.lua | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/xmake/modules/package/tools/autoconf.lua b/xmake/modules/package/tools/autoconf.lua index fd7cea0a7..b59e78cf1 100644 --- a/xmake/modules/package/tools/autoconf.lua +++ b/xmake/modules/package/tools/autoconf.lua @@ -73,6 +73,11 @@ function _get_msvc(package) return msvc end +-- get msvc run environments +function _get_msvc_runenvs(package) + return os.joinenvs(_get_msvc(package):runenvs()) +end + -- map compiler flags function _map_compflags(package, langkind, name, values) return compiler.map_flags(langkind, name, values, {target = package}) @@ -507,7 +512,13 @@ function make(package, argv, opt) end end assert(program, "make not found!") - os.vrunv(program, argv) + + if package:is_plat("windows") then + local envs = opt.envs or buildenvs(package, opt) + os.vrunv(program, argv, {envs = envs}) + else + os.vrunv(program, argv) + end end -- build package |
