diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-08-31 08:39:23 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2016-08-31 08:39:23 +0000 |
commit | 7f7aa9d4429256900793bceaef605279ab5e8ccb (patch) | |
tree | 1310411a36f1e39d3a4af11a681bef7cd76b5b21 /ext/extmk.rb | |
parent | 1b6a42d968ab4586b51cd1c1e114b46a9f788b94 (diff) | |
download | ruby-7f7aa9d4429256900793bceaef605279ab5e8ccb.tar.gz |
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
Diffstat (limited to 'ext/extmk.rb')
-rwxr-xr-x | ext/extmk.rb | 18 |
1 files changed, 18 insertions, 0 deletions
diff --git a/ext/extmk.rb b/ext/extmk.rb index 1b86ff0d71..97533219ee 100755 --- a/ext/extmk.rb +++ b/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[^/]+}]}" |