~ubuntu-branches/ubuntu/lucid/jruby/lucid

« back to all changes in this revision

Viewing changes to lib/ruby/1.9/rubygems/ext/rake_builder.rb

  • Committer: Bazaar Package Importer
  • Author(s): Sebastien Delafond
  • Date: 2009-12-09 17:30:55 UTC
  • Revision ID: james.westby@ubuntu.com-20091209173055-8ffzikq1768gywux
Tags: upstream-1.3.1
ImportĀ upstreamĀ versionĀ 1.3.1

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#--
 
2
# Copyright 2006 by Chad Fowler, Rich Kilmer, Jim Weirich and others.
 
3
# All rights reserved.
 
4
# See LICENSE.txt for permissions.
 
5
#++
 
6
 
 
7
require 'rubygems/ext/builder'
 
8
 
 
9
class Gem::Ext::RakeBuilder < Gem::Ext::Builder
 
10
 
 
11
  def self.build(extension, directory, dest_path, results)
 
12
    if File.basename(extension) =~ /mkrf_conf/i then
 
13
      cmd = "#{Gem.ruby} #{File.basename extension}"
 
14
      cmd << " #{ARGV.join " "}" unless ARGV.empty?
 
15
      run cmd, results
 
16
    end
 
17
 
 
18
    cmd = ENV['rake'] || 'rake'
 
19
    cmd += " RUBYARCHDIR=#{dest_path} RUBYLIBDIR=#{dest_path}" # ENV is frozen
 
20
 
 
21
    run cmd, results
 
22
 
 
23
    results
 
24
  end
 
25
 
 
26
end
 
27