mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
extmk.rb: build_complete
* ext/extmk.rb (create_makefile): make gem.build_complete file under TARGET_SO_DIR and install it only when the gem build succeeded. [ruby-core:77057] [Bug #12681] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@56048 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
1b6a42d968
commit
7f7aa9d442
3 changed files with 24 additions and 1 deletions
|
@ -1,3 +1,9 @@
|
|||
Wed Aug 31 17:39:19 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* ext/extmk.rb (create_makefile): make gem.build_complete file
|
||||
under TARGET_SO_DIR and install it only when the gem build
|
||||
succeeded. [ruby-core:77057] [Bug #12681]
|
||||
|
||||
Wed Aug 31 15:36:10 2016 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* ext/extmk.rb: move TARGET_SO_DIR stuffs to mkmf.rb.
|
||||
|
|
18
ext/extmk.rb
18
ext/extmk.rb
|
@ -568,6 +568,24 @@ Dir.chdir('..')
|
|||
FileUtils::makedirs('gems')
|
||||
Dir.chdir('gems')
|
||||
extout = $extout
|
||||
unless gems.empty?
|
||||
def self.create_makefile(*args, &block)
|
||||
if super(*args, &block)
|
||||
open("Makefile", "a") do |mf|
|
||||
mf << %{
|
||||
|
||||
build_complete = $(TARGET_SO_DIR)gem.build_complete
|
||||
install-so: build_complete
|
||||
build_complete: $(build_complete)
|
||||
$(build_complete): $(TARGET_SO)
|
||||
$(Q) $(TOUCH) $@
|
||||
|
||||
}
|
||||
end
|
||||
true
|
||||
end
|
||||
end
|
||||
end
|
||||
gems.each do |d|
|
||||
$extout = extout.dup
|
||||
$sodir = "$(extout)/gems/$(arch)/#{d[%r{\A[^/]+}]}"
|
||||
|
|
|
@ -766,7 +766,6 @@ install?(:ext, :comm, :gem) do
|
|||
File.chmod($data_mode, File.join(install_dir, "specifications", "#{spec.full_name}.gemspec"))
|
||||
unless spec.extensions.empty?
|
||||
install_recursive(ext, spec.extension_dir)
|
||||
open_for_install(spec.gem_build_complete_path, $data_mode) {""}
|
||||
end
|
||||
installed_gems[spec.full_name] = true
|
||||
end
|
||||
|
|
Loading…
Add table
Reference in a new issue