1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/template/fake.rb.in
nobu ad92b09e82 split tool/fake.rb
* tool/fake.rb: split from template/fake.rb.in.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@46715 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2014-07-06 05:20:10 +00:00

24 lines
871 B
Ruby

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 = File.join(builddir, "@srcdir@")
$:.unshift(File.expand_path(builddir))
fake = File.join(top_srcdir, "tool/fake.rb")
eval(File.read(fake), nil, fake)