Win32: Fix sub make commands

`cmd.exe` built-in `cd` does not recognize slashes as path separators,
replace to backslashes.
This commit is contained in:
Nobuyoshi Nakada 2024-12-27 16:26:14 +09:00
parent 3a2d1feb1e
commit e109400748
No known key found for this signature in database
GPG Key ID: 3582D74E1FEE4465
Notes: git 2024-12-27 08:40:39 +00:00
2 changed files with 8 additions and 6 deletions

View File

@ -817,9 +817,9 @@ begin
if $gnumake == "yes"
submake = "$(MAKE) -C $(@D)"
else
submake = "cd $(@D) && "
config_string("exec") {|str| submake << str << " "}
submake << "$(MAKE)"
submake = ["cd", (sep ? "$(@D:/=#{sep})" : "$(@D)"), "&&"]
config_string("exec") {|str| submake << str}
submake = (submake << "$(MAKE)").join(" ")
end
targets.each do |tgt|
exts.each do |d|

View File

@ -110,12 +110,14 @@ def self.column
w
end
objext = RbConfig::CONFIG["OBJEXT"]
sep = RbConfig::CONFIG['BUILD_FILE_SEPARATOR']
sep = nil if sep and sep.empty?
if gnumake
submake = "$(MAKE) -C $(@D)"
else
submake = "cd $(@D) && "
exec = RbConfig::CONFIG["exec"] and !exec.empty? and submake << exec << " "
submake << "$(MAKE)"
submake = ["cd", (sep ? "$(@D:/=#{sep})" : "$(@D)"), "&&"]
exec = RbConfig::CONFIG["exec"] and !exec.empty? and submake << exec
submake = (submake << "$(MAKE)").join(" ")
mflags = " $(MFLAGS)"
end
-%>