Skip to content

Commit

Permalink
Showing 1 changed file with 7 additions and 12 deletions.
19 changes: 7 additions & 12 deletions tool/jt.rb
Original file line number Diff line number Diff line change
@@ -690,7 +690,7 @@ def command_p(*args)
e 'p begin', *args, 'end'
end

def cextc(cext_dir, *clang_opts)
def build_ruby_su
abort "You need to set SULONG_HOME" unless SULONG_HOME

# Ensure ruby.su is up-to-date
@@ -702,6 +702,11 @@ def cextc(cext_dir, *clang_opts)
puts "Compiling outdated ruby.su"
cextc ruby_cext_api
end
end
private :build_ruby_su

def cextc(cext_dir, *clang_opts)
build_ruby_su

config_file = File.join(cext_dir, CEXTC_CONF_FILE)
unless File.exist?(config_file)
@@ -761,17 +766,7 @@ def cextc(cext_dir, *clang_opts)
end

def cextc_extconf(cext_dir, *clang_opts)
abort "You need to set SULONG_HOME" unless SULONG_HOME

# Ensure ruby.su is up-to-date
ruby_cext_api = "#{JRUBY_DIR}/truffle/src/main/c/cext"
ruby_c = "#{JRUBY_DIR}/truffle/src/main/c/cext/ruby.c"
ruby_h = "#{JRUBY_DIR}/lib/ruby/truffle/cext/ruby.h"
ruby_su = "#{JRUBY_DIR}/lib/ruby/truffle/cext/ruby.su"
if cext_dir != ruby_cext_api and (newer?(ruby_h, ruby_su) or newer?(ruby_c, ruby_su))
puts "Compiling outdated ruby.su"
cextc ruby_cext_api
end
build_ruby_su

gem_name = File.basename(cext_dir)
gem_dir = Dir.glob(ENV['GEM_HOME'] + "/gems/#{gem_name}*/")[0] + "ext/#{gem_name}/"

0 comments on commit a7afede

Please sign in to comment.