mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* lib/rubygems: Update to RubyGems master 278d00d. Changes:
Fixes building extensions without a "clean" make rule Adds gem dependency file autodetection to "gem install -g" * test/rubygems: Tests for the above. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@43299 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
28918eac58
commit
33d1f172c8
7 changed files with 80 additions and 12 deletions
|
@ -19,11 +19,6 @@ class Gem::Ext::Builder
|
|||
|
||||
CHDIR_MUTEX = Mutex.new # :nodoc:
|
||||
|
||||
##
|
||||
# `make` targets to run when building the extension
|
||||
|
||||
MAKE_TARGETS = ['clean', '', 'install'] # :nodoc:
|
||||
|
||||
attr_accessor :build_args # :nodoc:
|
||||
|
||||
def self.class_name
|
||||
|
@ -45,14 +40,18 @@ class Gem::Ext::Builder
|
|||
|
||||
destdir = '"DESTDIR=%s"' % ENV['DESTDIR'] if RUBY_VERSION > '2.0'
|
||||
|
||||
self::MAKE_TARGETS.each do |target|
|
||||
['clean', '', 'install'].each do |target|
|
||||
# Pass DESTDIR via command line to override what's in MAKEFLAGS
|
||||
cmd = [
|
||||
make_program,
|
||||
destdir,
|
||||
target
|
||||
].join(' ').rstrip
|
||||
run(cmd, results, "make #{target}".rstrip)
|
||||
begin
|
||||
run(cmd, results, "make #{target}".rstrip)
|
||||
rescue Gem::InstallError
|
||||
raise unless target == 'clean' # ignore clean failure
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue