diff options
Diffstat (limited to 'xmake/modules/package')
| -rw-r--r-- | xmake/modules/package/tools/autoconf.lua | 6 | ||||
| -rw-r--r-- | xmake/modules/package/tools/make.lua | 7 |
2 files changed, 11 insertions, 2 deletions
diff --git a/xmake/modules/package/tools/autoconf.lua b/xmake/modules/package/tools/autoconf.lua index 345b0fde9..8c800c190 100644 --- a/xmake/modules/package/tools/autoconf.lua +++ b/xmake/modules/package/tools/autoconf.lua @@ -60,7 +60,11 @@ end function _translate_windows_bin_path(bin_path) if bin_path then local argv = os.argv(bin_path) - argv[1] = path.unix(argv[1]) .. ".exe" + argv[1] = path.unix(argv[1]) + local path_lower = argv[1]:lower() + if not path_lower:endswith(".exe") and not path_lower:endswith(".cmd") and not path_lower:endswith(".bat") then + argv[1] = argv[1] .. ".exe" + end return os.args(argv) end end diff --git a/xmake/modules/package/tools/make.lua b/xmake/modules/package/tools/make.lua index 9399fa900..cec1361ad 100644 --- a/xmake/modules/package/tools/make.lua +++ b/xmake/modules/package/tools/make.lua @@ -27,7 +27,12 @@ import("private.utils.toolchain", {alias = "toolchain_utils"}) -- translate bin path function _translate_bin_path(bin_path) if is_host("windows") and bin_path then - return bin_path:gsub("\\", "/") .. ".exe" + bin_path = bin_path:gsub("\\", "/") + local bin_path_lower = bin_path:lower() + if not bin_path_lower:endswith(".exe") and not bin_path_lower:endswith(".cmd") and not bin_path_lower:endswith(".bat") then + bin_path = bin_path .. ".exe" + end + return bin_path end return bin_path end |
