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 1007748627 * template/fake.rb.in: not define $extout to make target in cwd.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@27242 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2010-04-06 17:06:20 +00:00

40 lines
1.4 KiB
Ruby
Executable file

baseruby="@BASERUBY@"
ruby="${RUBY-$baseruby}"
"eval" "{ `expr \"$ruby\" : echo > /dev/null || echo exec` $ruby "'-r"`expr \"$0\" : / > /dev/null || pwd`/${0#/}" "$@";' "}" || "exit" "$?"
class Object
CROSS_COMPILING = RUBY_PLATFORM
remove_const :RUBY_PLATFORM
remove_const :RUBY_VERSION
remove_const :RUBY_DESCRIPTION if defined?(RUBY_DESCRIPTION)
RUBY_PLATFORM = "@arch@"
RUBY_VERSION = "@RUBY_PROGRAM_VERSION@"
RUBY_DESCRIPTION = "ruby #{RUBY_VERSION} (@RUBY_RELEASE_DATE@) [#{RUBY_PLATFORM}]"
end
if RUBY_PLATFORM =~ /mswin|bccwin|mingw/
class File
remove_const :ALT_SEPARATOR
ALT_SEPARATOR = "\\"
end
end
$:.unshift(File.expand_path("..", __FILE__))
prehook = proc do
config = RbConfig::CONFIG
mkconfig = RbConfig::MAKEFILE_CONFIG
mkconfig["top_srcdir"] = $top_srcdir = File.expand_path("@abs_top_srcdir@")
mkconfig["rubyhdrdir"] = "$(top_srcdir)/include"
mkconfig["builddir"] = config["builddir"] = File.expand_path(File.dirname(__FILE__))
config["rubyhdrdir"] = File.join(mkconfig["top_srcdir"], "include")
mkconfig["libdir"] = config["libdir"] = mkconfig["topdir"]
untrace_var(:$extmk, prehook)
end
trace_var(:$extmk, prehook)
posthook = proc do
config = RbConfig::CONFIG
mkconfig = RbConfig::MAKEFILE_CONFIG
extout = File.expand_path(mkconfig["EXTOUT"], mkconfig["builddir"])
$arch_hdrdir = "#{extout}/include/$(arch)"
$ruby = baseruby
untrace_var(:$ruby, posthook)
end
trace_var(:$ruby, posthook)