diff options
Diffstat (limited to 'jni/ruby/template/fake.rb.in')
-rw-r--r-- | jni/ruby/template/fake.rb.in | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/jni/ruby/template/fake.rb.in b/jni/ruby/template/fake.rb.in new file mode 100644 index 0000000..6f5de50 --- /dev/null +++ b/jni/ruby/template/fake.rb.in @@ -0,0 +1,28 @@ +baseruby="@BASERUBY@" +ruby="${RUBY-$baseruby}" +"eval" "{" \ +"`expr \"$ruby\" : echo > /dev/null || echo exec`" \ +"$ruby" '-r"`expr \"$0\" : / > /dev/null || pwd`/${0#/}" "$@";' \ +"}" || "exit" "$?" +ruby=ruby +class Object + remove_const :CROSS_COMPILING if defined?(CROSS_COMPILING) + CROSS_COMPILING = RUBY_PLATFORM + remove_const :RUBY_PLATFORM + remove_const :RUBY_VERSION + remove_const :RUBY_RELEASE_DATE + remove_const :RUBY_DESCRIPTION if defined?(RUBY_DESCRIPTION) + RUBY_PLATFORM = "@arch@" + RUBY_VERSION = "@RUBY_PROGRAM_VERSION@" + RUBY_RELEASE_DATE = "@RUBY_RELEASE_DATE@" + RUBY_DESCRIPTION = "ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE}) [#{RUBY_PLATFORM}]" +end +builddir = File.dirname(__FILE__) +top_srcdir = "@abs_top_srcdir@" +if /mingw/ =~ RUBY_PLATFORM + # convert MSYS path to Windows path + top_srcdir.sub!(/\A\/([a-z])\//, '\\1:/') +end +$:.unshift(File.expand_path(builddir)) +fake = File.join(top_srcdir, "tool/fake.rb") +eval(File.read(fake), nil, fake) |