diff options
author | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-06-25 13:28:57 +0000 |
---|---|---|
committer | knu <knu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-06-25 13:28:57 +0000 |
commit | 8cc31037224bca3e9b5c8e8f9ae206753a3822f8 (patch) | |
tree | 82ed31572cd801b8a5beae7f0577290f5f170034 /lib/rubygems/ext | |
parent | 7565d728b6f3910cf41ce106bf0b7bc2aef2bc77 (diff) | |
download | ruby-8cc31037224bca3e9b5c8e8f9ae206753a3822f8.tar.gz |
* lib/rubygems/ext/builder.rb (Gem::Ext::Builder.make): Pass
DESTDIR via command line to override what's in MAKEFLAGS. This
fixes an installation problem under a package building
environment where DESTDIR is specified in the (parent) command
line. [Fixes GH-327]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@41629 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'lib/rubygems/ext')
-rw-r--r-- | lib/rubygems/ext/builder.rb | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/lib/rubygems/ext/builder.rb b/lib/rubygems/ext/builder.rb index 9b6ad304a2..ab454b4ba1 100644 --- a/lib/rubygems/ext/builder.rb +++ b/lib/rubygems/ext/builder.rb @@ -23,9 +23,14 @@ class Gem::Ext::Builder make_program = (/mswin/ =~ RUBY_PLATFORM) ? 'nmake' : 'make' end - ['', ' install'].each do |target| - cmd = "#{make_program}#{target}" - run(cmd, results, "make#{target}") + ['', 'install'].each do |target| + # Pass DESTDIR via command line to override what's in MAKEFLAGS + cmd = [ + make_program, + '"DESTDIR=%s"' % ENV['DESTDIR'], + target + ].join(' ').rstrip + run(cmd, results, "make #{target}".rstrip) end end |