[ruby/etc] Chec if the target file exists, not "depend" file
https://github.com/ruby/etc/commit/b95ddef386
This commit is contained in:
parent
2fa77fb82d
commit
4fced78605
@ -44,14 +44,16 @@ have_struct_member('struct group', 'gr_passwd', 'grp.h')
|
|||||||
# for https://github.com/ruby/etc
|
# for https://github.com/ruby/etc
|
||||||
srcdir = File.expand_path("..", __FILE__)
|
srcdir = File.expand_path("..", __FILE__)
|
||||||
constdefs = "#{srcdir}/constdefs.h"
|
constdefs = "#{srcdir}/constdefs.h"
|
||||||
ruby = RbConfig.ruby
|
if !File.exist?(constdefs)
|
||||||
if File.file?(ruby)
|
ruby = RbConfig.ruby
|
||||||
ruby = [ruby]
|
if File.file?(ruby)
|
||||||
else
|
ruby = [ruby]
|
||||||
require "shellwords"
|
else
|
||||||
ruby = Shellwords.split(ruby)
|
require "shellwords"
|
||||||
|
ruby = Shellwords.split(ruby)
|
||||||
|
end
|
||||||
|
system(*ruby, "#{srcdir}/mkconstants.rb", "-o", constdefs)
|
||||||
end
|
end
|
||||||
system(*ruby, "#{srcdir}/mkconstants.rb", "-o", constdefs)
|
|
||||||
|
|
||||||
# TODO: remove when dropping 2.7 support, as exported since 3.0
|
# TODO: remove when dropping 2.7 support, as exported since 3.0
|
||||||
have_func('rb_deprecate_constant(Qnil, "None")')
|
have_func('rb_deprecate_constant(Qnil, "None")')
|
||||||
|
Loading…
x
Reference in New Issue
Block a user