diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-08-31 06:36:12 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-08-31 06:36:12 +0000 |
commit | f2c2e9d45795a3a2784549fccbf17550722dba30 (patch) | |
tree | 7143150043286f8c5614374e05f27880db122b6e /ext | |
parent | 7406a91202a3824cb2194cc4c4ec4d5bfcbec94c (diff) | |
download | ruby-f2c2e9d45795a3a2784549fccbf17550722dba30.tar.gz |
mkmf.rb: TARGET_SO_DIR
* ext/extmk.rb: move TARGET_SO_DIR stuffs to mkmf.rb.
* lib/mkmf.rb (create_makefile): create target shared object files
under $(TARGET_SO_DIR) which is $sodir if it is defined with
$extout. [ruby-core:77058] [Bug #12681]
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56047 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'ext')
-rwxr-xr-x | ext/extmk.rb | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/ext/extmk.rb b/ext/extmk.rb index 0aaa483f26..1b86ff0d71 100755 --- a/ext/extmk.rb +++ b/ext/extmk.rb @@ -131,7 +131,7 @@ def extract_makefile(makefile, keep = true) true end -def extmake(target, basedir = (maybestatic = 'ext'), &block) +def extmake(target, basedir = (maybestatic = 'ext')) unless $configure_only || verbose? print "#{$message} #{target}\n" $stdout.flush @@ -225,7 +225,7 @@ def extmake(target, basedir = (maybestatic = 'ext'), &block) load $0 = conf end else - create_makefile(target, &block) + create_makefile(target) end $defs << "-DRUBY_EXPORT" if $static ok = File.exist?(makefile) @@ -243,7 +243,6 @@ def extmake(target, basedir = (maybestatic = 'ext'), &block) ok &&= File.open(makefile){|f| s = f.gets and !s[DUMMY_SIGNATURE]} unless ok mf = ["# #{DUMMY_SIGNATURE}\n", *dummy_makefile(CONFIG["srcdir"])].join("") - mf = yield mf if block atomic_write_open(makefile) do |f| f.print(mf) end @@ -571,15 +570,8 @@ Dir.chdir('gems') extout = $extout gems.each do |d| $extout = extout.dup - extmake(d, 'gems') do |mf| - mf.sub!(/^RUBYARCHDIR *= *(\$\(extout\))\/(\$\(arch\))(.*)/) { - "TARGET_SO_DIR = #$1/gems/#$2/#{d[%r{\A[^/]+}]}#$3\n" \ - "TARGET_SO_TIME = .gems.-.arch.-.#{d[/\A[^\/]+/]}.time" - } - mf.gsub!(/\bRUBYARCHDIR\b/, 'TARGET_SO_DIR') - mf.gsub!(/\.TARGET_SO_DIR\.time/, '$(TARGET_SO_TIME)') - mf - end + $sodir = "$(extout)/gems/$(arch)/#{d[%r{\A[^/]+}]}" + extmake(d, 'gems') end $extout = extout Dir.chdir('../ext') |