Skip to content
Browse files

Remove custom mingw build scripts, use rake compiler instead.

  • Loading branch information...
1 parent 0d13847 commit 263fd0221d9ceda63bb8a2d607022dcc8a4cc711 Charlie Savage committed Sep 5, 2011
Showing with 0 additions and 61 deletions.
  1. +0 −23 ext/ruby_prof/mingw/Rakefile
  2. +0 −38 ext/ruby_prof/mingw/build.rake
View
23 ext/ruby_prof/mingw/Rakefile
@@ -1,23 +0,0 @@
-# We can't use Ruby's standard build procedures
-# on Windows because the Ruby executable is
-# built with VC++ while here we want to build
-# with MingW. So just roll our own...
-
-require 'fileutils'
-require 'rbconfig'
-
-EXTENSION_NAME = "ruby_prof.#{Config::CONFIG["DLEXT"]}"
-
-# This is called when the Windows GEM is installed!
-task :install do
- # Gems will pass these two environment variables:
- # RUBYARCHDIR=#{dest_path}
- # RUBYLIBDIR=#{dest_path}
-
- dest_path = ENV['RUBYLIBDIR']
-
- # Copy the extension
- cp(EXTENSION_NAME, dest_path)
-end
-
-task :default => :install
View
38 ext/ruby_prof/mingw/build.rake
@@ -1,38 +0,0 @@
-# We can't use Ruby's standard build procedures
-# on Windows because the Ruby executable is
-# built with VC++ while here we want to build
-# with MingW. So just roll our own...
-
-require 'rake/clean'
-require 'rbconfig'
-
-RUBY_INCLUDE_DIR = Config::CONFIG["archdir"]
-RUBY_BIN_DIR = Config::CONFIG["bindir"]
-RUBY_LIB_DIR = Config::CONFIG["libdir"]
-RUBY_SHARED_LIB = Config::CONFIG["LIBRUBY"]
-RUBY_SHARED_DLL = RUBY_SHARED_LIB.gsub(/lib$/, 'dll')
-
-EXTENSION_NAME = "ruby_prof.#{Config::CONFIG["DLEXT"]}"
-
-CLEAN.include('*.o')
-CLOBBER.include(EXTENSION_NAME)
-
-task :default => "ruby_prof"
-
-SRC = FileList['../*.c']
-OBJ = SRC.collect do |file_name|
- File.basename(file_name).ext('o')
-end
-
-SRC.each do |srcfile|
- objfile = File.basename(srcfile).ext('o')
- file objfile => srcfile do
- command = "gcc -c -fPIC -O2 -Wall -o #{objfile} -I/usr/local/include #{srcfile} -I#{RUBY_INCLUDE_DIR}"
- sh "sh -c '#{command}'"
- end
-end
-
-file "ruby_prof" => OBJ do
- command = "gcc -shared -o #{EXTENSION_NAME} -L/usr/local/lib #{OBJ} #{RUBY_BIN_DIR}/#{RUBY_SHARED_DLL}"
- sh "sh -c '#{command}'"
-end

0 comments on commit 263fd02

Please sign in to comment.
Something went wrong with that request. Please try again.