Revert an accidentally merged change [ci skip]
This commit is contained in:
parent
09638741ba
commit
55b68d6cdc
@ -33,6 +33,12 @@ def compile_extension(name)
|
|||||||
ruby_header = "#{rubyhdrdir}/ruby.h"
|
ruby_header = "#{rubyhdrdir}/ruby.h"
|
||||||
abi_header = "#{rubyhdrdir}/ruby/internal/abi.h"
|
abi_header = "#{rubyhdrdir}/ruby/internal/abi.h"
|
||||||
|
|
||||||
|
if RbConfig::CONFIG["ENABLE_SHARED"] == "yes"
|
||||||
|
# below is defined since 2.1, except for mswin, and maybe other platforms
|
||||||
|
libdirname = RbConfig::CONFIG.fetch 'libdirname', 'libdir'
|
||||||
|
libruby = "#{RbConfig::CONFIG[libdirname]}/#{RbConfig::CONFIG['LIBRUBY']}"
|
||||||
|
end
|
||||||
|
|
||||||
begin
|
begin
|
||||||
mtime = File.mtime(lib)
|
mtime = File.mtime(lib)
|
||||||
rescue Errno::ENOENT
|
rescue Errno::ENOENT
|
||||||
@ -43,6 +49,7 @@ def compile_extension(name)
|
|||||||
when mtime <= File.mtime("#{spec_ext_dir}/#{ext}.c")
|
when mtime <= File.mtime("#{spec_ext_dir}/#{ext}.c")
|
||||||
when mtime <= File.mtime(ruby_header)
|
when mtime <= File.mtime(ruby_header)
|
||||||
when (mtime <= File.mtime(abi_header) rescue nil)
|
when (mtime <= File.mtime(abi_header) rescue nil)
|
||||||
|
when libruby && mtime <= File.mtime(libruby)
|
||||||
else
|
else
|
||||||
return lib # up-to-date
|
return lib # up-to-date
|
||||||
end
|
end
|
||||||
|
Loading…
x
Reference in New Issue
Block a user