Navigation Menu

Skip to content

Commit

Permalink
Try to build under MinGW (experimental)
Browse files Browse the repository at this point in the history
  • Loading branch information
cosmo0920 committed Jan 31, 2015
1 parent b5587a7 commit 4ae4d74
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion extconf.rb
Expand Up @@ -19,6 +19,7 @@
require 'pathname'
require 'fileutils'
require 'mkmf'
require 'shellwords'

base_dir = Pathname(__FILE__).dirname.realpath

Expand Down Expand Up @@ -53,11 +54,16 @@
makefile.puts
targets = ["all", "clean", "install"]
targets.each do |target|
if RUBY_PLATFORM =~ /win|mingw/
make = `where make`.chomp
else
make = "$(MAKE)"
end
# overriding RUBYARCHDIR and RUBYLIBDIR for RubyGems.
makefile.puts <<-EOM
#{target}:
cd #{source_ext_dir}; \\
$(MAKE) $(MAKE_ARGS) \\
#{Shellwords.escape(make)} $(MAKE_ARGS) \\
RUBYARCHDIR=$(RUBYARCHDIR) \\
RUBYLIBDIR=$(RUBYLIBDIR) \\
#{target}
Expand Down

0 comments on commit 4ae4d74

Please sign in to comment.