mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
25f99aef58
* common.mk (test-rubyspec): use fake script to set header directories. * template/fake.rb.in (RUBYOPT): set -r option to propagate to forked processes. * tool/fake.rb (prehook): set rubyarchhdrdir too. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@49758 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
30 lines
1 KiB
Ruby
30 lines
1 KiB
Ruby
baseruby="@BASERUBY@"
|
|
ruby="${RUBY-$baseruby}"
|
|
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)
|
|
ENV["RUBYOPT"] = ["-r#{__FILE__}", ENV["RUBYOPT"]].compact.join(" ")
|