File tree Expand file tree Collapse file tree 1 file changed +7
-1
lines changed
Expand file tree Collapse file tree 1 file changed +7
-1
lines changed Original file line number Diff line number Diff line change @@ -89,6 +89,12 @@ def compile_extension(name)
8989 $ruby = ENV.values_at('RUBY_EXE', 'RUBY_FLAGS').join(' ')
9090 # MRI magic to consider building non-bundled extensions
9191 $extout = nil
92+ if RbConfig::CONFIG.key?("buildlibdir") # The top directory where the libruby is built.
93+ # Prepend the dummy macro to bypass the conversion in `with_destdir` on DOSISH
94+ # platforms, where the drive letter is replaced with `$(DESTDIR)`. `DESTDIR` is
95+ # overridden by the command line argument bellow.
96+ RbConfig::MAKEFILE_CONFIG["buildlibdir"] = "$(empty)" + RbConfig::CONFIG["buildlibdir"]
97+ end
9298 append_cflags '-Wno-declaration-after-statement'
9399 #{ "append_cflags #{ ruby_repository_extra_include_dir . inspect } " if ruby_repository_extra_include_dir }
94100 create_makefile(#{ ext . inspect } )
@@ -117,7 +123,7 @@ def compile_extension(name)
117123def setup_make
118124 make = ENV [ 'MAKE' ]
119125 make ||= ( RbConfig ::CONFIG [ 'host_os' ] . include? ( "mswin" ) ? "nmake" : "make" )
120- env = %w[ MFLAGS MAKEFLAGS GNUMAKEFLAGS ] . to_h { |var | [ env , ENV [ var ] ] }
126+ env = %w[ MFLAGS MAKEFLAGS GNUMAKEFLAGS ] . to_h { |var | [ var , ENV [ var ] ] }
121127 make_flags = env [ "MAKEFLAGS" ] || ''
122128
123129 # suppress logo of nmake.exe to stderr
You can’t perform that action at this time.
0 commit comments