ruby-changes:43975
From: nobu <ko1@a...>
Date: Wed, 31 Aug 2016 17:39:27 +0900 (JST)
Subject: [ruby-changes:43975] nobu:r56048 (trunk): extmk.rb: build_complete
nobu 2016-08-31 17:39:23 +0900 (Wed, 31 Aug 2016) New Revision: 56048 https://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=revision&revision=56048 Log: 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] Modified files: trunk/ChangeLog trunk/ext/extmk.rb trunk/tool/rbinstall.rb Index: tool/rbinstall.rb =================================================================== --- tool/rbinstall.rb (revision 56047) +++ tool/rbinstall.rb (revision 56048) @@ -766,7 +766,6 @@ install?(:ext, :comm, :gem) do https://github.com/ruby/ruby/blob/trunk/tool/rbinstall.rb#L766 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 Index: ext/extmk.rb =================================================================== --- ext/extmk.rb (revision 56047) +++ ext/extmk.rb (revision 56048) @@ -568,6 +568,24 @@ Dir.chdir('..') https://github.com/ruby/ruby/blob/trunk/ext/extmk.rb#L568 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[^/]+}]}" Index: ChangeLog =================================================================== --- ChangeLog (revision 56047) +++ ChangeLog (revision 56048) @@ -1,3 +1,9 @@ https://github.com/ruby/ruby/blob/trunk/ChangeLog#L1 +Wed Aug 31 17:39:19 2016 Nobuyoshi Nakada <nobu@r...> + + * 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@r...> * ext/extmk.rb: move TARGET_SO_DIR stuffs to mkmf.rb. -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/