mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
bigdecimal: dependency
* ext/bigdecimal/extconf.rb: extconf.h depends on the gemspec file. [ruby-core:84247] [Bug #14180] git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@61221 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
98b6b9e152
commit
54b89699d9
1 changed files with 9 additions and 7 deletions
|
@ -1,12 +1,12 @@
|
|||
# frozen_string_literal: false
|
||||
require 'mkmf'
|
||||
|
||||
case
|
||||
when File.file?(File.expand_path('../bigdecimal.gemspec', __FILE__))
|
||||
gemspec_path = File.expand_path('../bigdecimal.gemspec', __FILE__)
|
||||
when File.file?(File.expand_path('../../../bigdecimal.gemspec', __FILE__))
|
||||
gemspec_path = File.expand_path('../../../bigdecimal.gemspec', __FILE__)
|
||||
else
|
||||
gemspec_name = gemspec_path = nil
|
||||
unless ['', '../../'].any? {|dir|
|
||||
gemspec_name = "#{dir}bigdecimal.gemspec"
|
||||
gemspec_path = File.expand_path("../#{gemspec_name}", __FILE__)
|
||||
File.file?(gemspec_path)
|
||||
}
|
||||
$stderr.puts "Unable to find bigdecimal.gemspec"
|
||||
abort
|
||||
end
|
||||
|
@ -30,4 +30,6 @@ have_func("rb_rational_den", "ruby.h")
|
|||
have_func("rb_array_const_ptr", "ruby.h")
|
||||
have_func("rb_sym2str", "ruby.h")
|
||||
|
||||
create_makefile('bigdecimal')
|
||||
create_makefile('bigdecimal') {|mf|
|
||||
mf << "\nall:\n\nextconf.h: $(srcdir)/#{gemspec_name}\n"
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue