зеркало из https://github.com/github/ruby.git
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
This commit is contained in:
Родитель
a617afc643
Коммит
ad92b09e82
|
@ -10,39 +10,15 @@ class Object
|
|||
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_DESCRIPTION = "ruby #{RUBY_VERSION} (@RUBY_RELEASE_DATE@) [#{RUBY_PLATFORM}]"
|
||||
RUBY_RELEASE_DATE = "@RUBY_RELEASE_DATE@"
|
||||
RUBY_DESCRIPTION = "ruby #{RUBY_VERSION} (#{RUBY_RELEASE_DATE}) [#{RUBY_PLATFORM}]"
|
||||
end
|
||||
class File
|
||||
sep = ("\\" if RUBY_PLATFORM =~ /mswin|bccwin|mingw/)
|
||||
if sep != ALT_SEPARATOR
|
||||
remove_const :ALT_SEPARATOR
|
||||
ALT_SEPARATOR = sep
|
||||
end
|
||||
end
|
||||
|
||||
builddir = File.expand_path(File.dirname(__FILE__))
|
||||
$:.unshift(builddir)
|
||||
posthook = proc do
|
||||
mkconfig = RbConfig::MAKEFILE_CONFIG
|
||||
extout = File.expand_path(mkconfig["EXTOUT"], builddir)
|
||||
$arch_hdrdir = "#{extout}/include/$(arch)"
|
||||
$ruby = baseruby
|
||||
untrace_var(:$ruby, posthook)
|
||||
end
|
||||
prehook = proc do |extmk|
|
||||
unless extmk
|
||||
config = RbConfig::CONFIG
|
||||
mkconfig = RbConfig::MAKEFILE_CONFIG
|
||||
mkconfig["top_srcdir"] = $top_srcdir = File.expand_path("@top_srcdir@", builddir)
|
||||
mkconfig["rubyhdrdir"] = "$(top_srcdir)/include"
|
||||
mkconfig["builddir"] = config["builddir"] = builddir
|
||||
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)
|
||||
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)
|
||||
|
|
|
@ -0,0 +1,30 @@
|
|||
class File
|
||||
sep = ("\\" if RUBY_PLATFORM =~ /mswin|bccwin|mingw/)
|
||||
if sep != ALT_SEPARATOR
|
||||
remove_const :ALT_SEPARATOR
|
||||
ALT_SEPARATOR = sep
|
||||
end
|
||||
end
|
||||
|
||||
$:.unshift(builddir)
|
||||
posthook = proc do
|
||||
mkconfig = RbConfig::MAKEFILE_CONFIG
|
||||
extout = File.expand_path(mkconfig["EXTOUT"], builddir)
|
||||
$arch_hdrdir = "#{extout}/include/$(arch)"
|
||||
$ruby = baseruby
|
||||
untrace_var(:$ruby, posthook)
|
||||
end
|
||||
prehook = proc do |extmk|
|
||||
unless extmk
|
||||
config = RbConfig::CONFIG
|
||||
mkconfig = RbConfig::MAKEFILE_CONFIG
|
||||
mkconfig["top_srcdir"] = $top_srcdir = top_srcdir
|
||||
mkconfig["rubyhdrdir"] = "$(top_srcdir)/include"
|
||||
mkconfig["builddir"] = config["builddir"] = builddir
|
||||
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)
|
Загрузка…
Ссылка в новой задаче