Update to ruby/spec@ca32ae2
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@58942 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
135ed12ea6
commit
75adc77e7c
@ -1,10 +0,0 @@
|
|||||||
#ifndef RUBYSPEC_CAPI_JRUBY_H
|
|
||||||
#define RUBYSPEC_CAPI_JRUBY_H
|
|
||||||
|
|
||||||
/* #undef any HAVE_ defines that JRuby does not have. */
|
|
||||||
#undef HAVE_RB_DEFINE_HOOKED_VARIABLE
|
|
||||||
#undef HAVE_RB_DEFINE_VARIABLE
|
|
||||||
|
|
||||||
#undef HAVE_RB_EXEC_RECURSIVE
|
|
||||||
|
|
||||||
#endif
|
|
@ -1,8 +0,0 @@
|
|||||||
#ifndef RUBYSPEC_CAPI_RUBINIUS_H
|
|
||||||
#define RUBYSPEC_CAPI_RUBINIUS_H
|
|
||||||
|
|
||||||
/* #undef any HAVE_ defines that Rubinius does not have. */
|
|
||||||
#undef HAVE_RB_DEFINE_HOOKED_VARIABLE
|
|
||||||
#undef HAVE_RB_DEFINE_VARIABLE
|
|
||||||
|
|
||||||
#endif
|
|
@ -595,19 +595,4 @@
|
|||||||
/* Util */
|
/* Util */
|
||||||
#define HAVE_RB_SCAN_ARGS 1
|
#define HAVE_RB_SCAN_ARGS 1
|
||||||
|
|
||||||
/* Now, create the differential set. The format of the preprocessor directives
|
|
||||||
* is significant. The alternative implementations should define RUBY because
|
|
||||||
* some extensions depend on that. But only one alternative implementation
|
|
||||||
* macro should be defined at a time. The conditional is structured so that if
|
|
||||||
* no alternative implementation is defined then MRI is assumed.
|
|
||||||
*/
|
|
||||||
|
|
||||||
#if defined(RUBINIUS)
|
|
||||||
#include "rubinius.h"
|
|
||||||
#elif defined(JRUBY)
|
|
||||||
#include "jruby.h"
|
|
||||||
#elif defined(TRUFFLERUBY)
|
|
||||||
#include "truffleruby.h"
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#endif
|
#endif
|
||||||
|
@ -1,6 +0,0 @@
|
|||||||
#ifndef RUBYSPEC_CAPI_TRUFFLERUBY_H
|
|
||||||
#undef RUBYSPEC_CAPI_TRUFFLERUBY_H
|
|
||||||
|
|
||||||
// All features are available
|
|
||||||
|
|
||||||
#endif
|
|
@ -22,21 +22,20 @@ def compile_extension(name)
|
|||||||
end
|
end
|
||||||
|
|
||||||
ext = "#{name}_spec"
|
ext = "#{name}_spec"
|
||||||
source = "#{extension_path}/#{ext}.c"
|
|
||||||
lib = "#{object_path}/#{ext}.#{RbConfig::CONFIG['DLEXT']}"
|
lib = "#{object_path}/#{ext}.#{RbConfig::CONFIG['DLEXT']}"
|
||||||
ruby_header = "#{RbConfig::CONFIG['rubyhdrdir']}/ruby.h"
|
ruby_header = "#{RbConfig::CONFIG['rubyhdrdir']}/ruby.h"
|
||||||
|
|
||||||
return lib if File.exist?(lib) and
|
return lib if File.exist?(lib) and
|
||||||
File.mtime(lib) > File.mtime(source) and
|
|
||||||
File.mtime(lib) > File.mtime(ruby_header) and
|
|
||||||
File.mtime(lib) > File.mtime("#{extension_path}/rubyspec.h") and
|
File.mtime(lib) > File.mtime("#{extension_path}/rubyspec.h") and
|
||||||
|
File.mtime(lib) > File.mtime("#{extension_path}/#{ext}.c") and
|
||||||
|
File.mtime(lib) > File.mtime(ruby_header) and
|
||||||
true # sentinel
|
true # sentinel
|
||||||
|
|
||||||
# Copy needed source files to tmpdir
|
# Copy needed source files to tmpdir
|
||||||
tmpdir = tmp("cext_#{name}")
|
tmpdir = tmp("cext_#{name}")
|
||||||
Dir.mkdir(tmpdir)
|
Dir.mkdir(tmpdir)
|
||||||
begin
|
begin
|
||||||
["jruby.h", "rubinius.h", "truffleruby.h", "rubyspec.h", "#{ext}.c"].each do |file|
|
["rubyspec.h", "#{ext}.c"].each do |file|
|
||||||
cp "#{extension_path}/#{file}", "#{tmpdir}/#{file}"
|
cp "#{extension_path}/#{file}", "#{tmpdir}/#{file}"
|
||||||
end
|
end
|
||||||
|
|
||||||
@ -58,9 +57,7 @@ def compile_extension(name)
|
|||||||
raise "make failed:\n#{output}" unless $?.success?
|
raise "make failed:\n#{output}" unless $?.success?
|
||||||
$stderr.puts output if debug
|
$stderr.puts output if debug
|
||||||
|
|
||||||
Dir.glob("*.#{RbConfig::CONFIG['DLEXT']}") do |file|
|
cp File.basename(lib), lib
|
||||||
cp file, "#{object_path}/#{file}"
|
|
||||||
end
|
|
||||||
end
|
end
|
||||||
ensure
|
ensure
|
||||||
rm_r tmpdir
|
rm_r tmpdir
|
||||||
|
Loading…
x
Reference in New Issue
Block a user