2010-04-06 06:21:40 +04:00
|
|
|
baseruby="@BASERUBY@"
|
|
|
|
ruby="${RUBY-$baseruby}"
|
2011-01-23 04:32:57 +03:00
|
|
|
"eval" "{" \
|
|
|
|
"`expr \"$ruby\" : echo > /dev/null || echo exec`" \
|
|
|
|
"$ruby" '-r"`expr \"$0\" : / > /dev/null || pwd`/${0#/}" "$@";' \
|
|
|
|
"}" || "exit" "$?"
|
|
|
|
ruby=ruby
|
2009-02-19 09:47:13 +03:00
|
|
|
class Object
|
2011-02-11 05:39:05 +03:00
|
|
|
remove_const :CROSS_COMPILING if defined?(CROSS_COMPILING)
|
2009-02-19 09:47:13 +03:00
|
|
|
CROSS_COMPILING = RUBY_PLATFORM
|
|
|
|
remove_const :RUBY_PLATFORM
|
|
|
|
remove_const :RUBY_VERSION
|
|
|
|
remove_const :RUBY_DESCRIPTION if defined?(RUBY_DESCRIPTION)
|
|
|
|
RUBY_PLATFORM = "@arch@"
|
2009-08-21 02:14:58 +04:00
|
|
|
RUBY_VERSION = "@RUBY_PROGRAM_VERSION@"
|
|
|
|
RUBY_DESCRIPTION = "ruby #{RUBY_VERSION} (@RUBY_RELEASE_DATE@) [#{RUBY_PLATFORM}]"
|
2009-02-19 09:47:13 +03:00
|
|
|
end
|
|
|
|
if RUBY_PLATFORM =~ /mswin|bccwin|mingw/
|
|
|
|
class File
|
|
|
|
remove_const :ALT_SEPARATOR
|
|
|
|
ALT_SEPARATOR = "\\"
|
|
|
|
end
|
|
|
|
end
|
2010-04-06 06:21:40 +04:00
|
|
|
|
2012-08-09 18:46:44 +04:00
|
|
|
builddir = File.expand_path(File.dirname(__FILE__))
|
|
|
|
$:.unshift(builddir)
|
2010-04-06 06:21:40 +04:00
|
|
|
posthook = proc do
|
2010-04-06 21:06:20 +04:00
|
|
|
mkconfig = RbConfig::MAKEFILE_CONFIG
|
2012-08-09 18:46:44 +04:00
|
|
|
extout = File.expand_path(mkconfig["EXTOUT"], builddir)
|
2010-04-06 21:06:20 +04:00
|
|
|
$arch_hdrdir = "#{extout}/include/$(arch)"
|
2010-04-06 06:21:40 +04:00
|
|
|
$ruby = baseruby
|
|
|
|
untrace_var(:$ruby, posthook)
|
|
|
|
end
|
2010-04-24 11:20:28 +04:00
|
|
|
prehook = proc do |extmk|
|
|
|
|
unless extmk
|
|
|
|
config = RbConfig::CONFIG
|
|
|
|
mkconfig = RbConfig::MAKEFILE_CONFIG
|
2010-07-21 18:07:21 +04:00
|
|
|
mkconfig["top_srcdir"] = $top_srcdir = File.expand_path("@top_srcdir@", builddir)
|
2010-04-24 11:20:28 +04:00
|
|
|
mkconfig["rubyhdrdir"] = "$(top_srcdir)/include"
|
2010-07-21 18:07:21 +04:00
|
|
|
mkconfig["builddir"] = config["builddir"] = builddir
|
2010-04-24 11:20:28 +04:00
|
|
|
config["rubyhdrdir"] = File.join(mkconfig["top_srcdir"], "include")
|
|
|
|
mkconfig["libdir"] = config["libdir"] = mkconfig["topdir"]
|
|
|
|
trace_var(:$ruby, posthook)
|
|
|
|
end
|
|
|
|
untrace_var(:$extmk, prehook)
|
|
|
|
end
|
|
|
|
trace_var(:$extmk, prehook)
|