From: "Marcel O." Date: 2011-02-08T06:18:14+09:00 Subject: Re: mkmf-bug under mingw without msys Gordon Thiesfeld wrote in post #978911: > On Tue, Feb 1, 2011 at 10:31 AM, Marcel O. > wrote: >>> >>> it's transparent usage under Ruby for Windows: >> this is the normal case under windows due to the DevKit. >> >> I made a proposal to use the OS_TYPE environment variable, but I don't >> know if this will work on all systems. If no one can tell if this would >> work and no one else is interested in fixing this and supporting the >> MinGW-only use case, I must try to integrate the DevKit in our build >> environment. In this case: Would it be possible to integrate DevKit's >> MinGW+MSYS environment without the involvement of RubyGems. >> > > You can require the devkit without rubygems. > > ruby -rdevkit extconf.rb Adding the following to extconf.rb did the job for me. It implements a workaround hack, by undoing the work of the stupid mkintpath function. if CONFIG['build_os'] == 'mingw32' && ENV['MSYSTEM'] != 'MINGW32' # we are using MinGW without MSYS mf_content = IO.read( "Makefile" ) mf_content.gsub!( /^topdir = \/([a-zA-Z])/ ) { "topdir = #{$1}:" } # Ruby 1.8 mf_content.gsub!( /^hdrdir = \/([a-zA-Z])/ ) { "hdrdir = #{$1}:" } # Ruby 1.9 File.open( "Makefile", "w" ) { |mf| mf.puts mf_content } end -- Posted via http://www.ruby-forum.com/.