summaryrefslogtreecommitdiff
path: root/template
diff options
context:
space:
mode:
authorNobuyoshi Nakada <[email protected]>2024-12-27 16:26:14 +0900
committerNobuyoshi Nakada <[email protected]>2024-12-27 16:26:14 +0900
commite109400748a62f142d0b1ca6957dab69ca411de1 (patch)
treed5a6494eea66c5348a0ac7ce20ffa5c87ff58bdd /template
parent3a2d1feb1e24569090061bfcab88e3a1ecc24750 (diff)
Win32: Fix sub make commands
`cmd.exe` built-in `cd` does not recognize slashes as path separators, replace to backslashes.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/12481
Diffstat (limited to 'template')
-rw-r--r--template/exts.mk.tmpl8
1 files changed, 5 insertions, 3 deletions
diff --git a/template/exts.mk.tmpl b/template/exts.mk.tmpl
index 0abbca1f06..e482808f54 100644
--- a/template/exts.mk.tmpl
+++ b/template/exts.mk.tmpl
@@ -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
-%>