зеркало из https://github.com/github/ruby.git
* ext/extmk.rb, enc/make_encmake.rb: load current mkmf.rb even if
cross-compiling. * ext/extmk.rb, enc/make_encmake.rb, lib/mkmf.rb: need to be 1.8 compatible for cross-compiling. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@15616 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
99e8314b3b
Коммит
9d014dc254
|
@ -1,3 +1,11 @@
|
||||||
|
Wed Feb 27 03:55:58 2008 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* ext/extmk.rb, enc/make_encmake.rb: load current mkmf.rb even if
|
||||||
|
cross-compiling.
|
||||||
|
|
||||||
|
* ext/extmk.rb, enc/make_encmake.rb, lib/mkmf.rb: need to be 1.8
|
||||||
|
compatible for cross-compiling.
|
||||||
|
|
||||||
Tue Feb 26 16:53:13 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
Tue Feb 26 16:53:13 2008 Yukihiro Matsumoto <matz@ruby-lang.org>
|
||||||
|
|
||||||
* misc/ruby-mode.el (ruby-calculate-indent): should distinguish
|
* misc/ruby-mode.el (ruby-calculate-indent): should distinguish
|
||||||
|
|
|
@ -1,10 +1,10 @@
|
||||||
#! ./miniruby
|
#! ./miniruby
|
||||||
|
|
||||||
dir = File.expand_path("../..", __FILE__)
|
dir = File.expand_path("../..", __FILE__)
|
||||||
$:.unshift(File.join(dir, "lib"))
|
|
||||||
$:.unshift(dir)
|
$:.unshift(dir)
|
||||||
$:.unshift(".")
|
$:.unshift(".")
|
||||||
require 'mkmf'
|
$" << "mkmf.rb"
|
||||||
|
load File.expand_path("lib/mkmf.rb", dir)
|
||||||
require 'erb'
|
require 'erb'
|
||||||
|
|
||||||
if /--builtin-encs=/ =~ ARGV[0]
|
if /--builtin-encs=/ =~ ARGV[0]
|
||||||
|
|
43
ext/extmk.rb
43
ext/extmk.rb
|
@ -24,17 +24,18 @@ alias $0 $progname
|
||||||
$extlist = []
|
$extlist = []
|
||||||
$compiled = {}
|
$compiled = {}
|
||||||
|
|
||||||
$:.replace([Dir.pwd])
|
|
||||||
require 'rbconfig'
|
|
||||||
|
|
||||||
srcdir = File.dirname(File.dirname(__FILE__))
|
srcdir = File.dirname(File.dirname(__FILE__))
|
||||||
|
unless defined?(CROSS_COMPILING) and CROSS_COMPILING
|
||||||
$:.unshift(srcdir, File.expand_path("lib", srcdir))
|
$:.replace([File.expand_path("lib", srcdir), Dir.pwd])
|
||||||
|
end
|
||||||
|
$:.unshift(srcdir)
|
||||||
|
require 'rbconfig'
|
||||||
|
|
||||||
$topdir = "."
|
$topdir = "."
|
||||||
$top_srcdir = srcdir
|
$top_srcdir = srcdir
|
||||||
|
|
||||||
require 'mkmf'
|
$" << "mkmf.rb"
|
||||||
|
load File.expand_path("lib/mkmf.rb", srcdir)
|
||||||
require 'optparse/shellwords'
|
require 'optparse/shellwords'
|
||||||
|
|
||||||
def sysquote(x)
|
def sysquote(x)
|
||||||
|
@ -60,7 +61,7 @@ def extract_makefile(makefile, keep = true)
|
||||||
unless installrb.empty?
|
unless installrb.empty?
|
||||||
config = CONFIG.dup
|
config = CONFIG.dup
|
||||||
install_dirs(target_prefix).each {|var, val| config[var] = val}
|
install_dirs(target_prefix).each {|var, val| config[var] = val}
|
||||||
FileUtils.rm_f(installrb.values.collect {|f| RbConfig.expand(f, config)}, verbose: true)
|
FileUtils.rm_f(installrb.values.collect {|f| RbConfig.expand(f, config)}, :verbose => true)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
return false
|
return false
|
||||||
|
@ -287,7 +288,7 @@ def parse_args()
|
||||||
$mflags.unshift(*rest) unless rest.empty?
|
$mflags.unshift(*rest) unless rest.empty?
|
||||||
|
|
||||||
def $mflags.set?(flag)
|
def $mflags.set?(flag)
|
||||||
grep(/\A-(?!-).*#{'%s' % flag}/i) { return true }
|
grep(/\A-(?!-).*#{flag.chr}/i) { return true }
|
||||||
false
|
false
|
||||||
end
|
end
|
||||||
def $mflags.defined?(var)
|
def $mflags.defined?(var)
|
||||||
|
@ -337,18 +338,22 @@ end
|
||||||
|
|
||||||
EXEEXT = CONFIG['EXEEXT']
|
EXEEXT = CONFIG['EXEEXT']
|
||||||
if CROSS_COMPILING
|
if CROSS_COMPILING
|
||||||
$ruby = CONFIG['MINIRUBY']
|
$ruby = $mflags.defined?("MINIRUBY") || CONFIG['MINIRUBY']
|
||||||
elsif sep = config_string('BUILD_FILE_SEPARATOR')
|
elsif sep = config_string('BUILD_FILE_SEPARATOR')
|
||||||
$ruby = "$(topdir:/=#{sep})#{sep}miniruby" + EXEEXT
|
$ruby = "$(topdir:/=#{sep})#{sep}miniruby" + EXEEXT
|
||||||
else
|
else
|
||||||
$ruby = '$(topdir)/miniruby' + EXEEXT
|
$ruby = '$(topdir)/miniruby' + EXEEXT
|
||||||
end
|
end
|
||||||
$ruby << " -I'$(topdir)' -I'$(top_srcdir)/lib'"
|
$ruby << " -I'$(topdir)'"
|
||||||
$ruby << " -I'$(extout)/$(arch)' -I'$(extout)/common'" if $extout
|
unless CROSS_COMPILING
|
||||||
$ruby << " -I'$(top_srcdir)/ext' -rpurelib.rb"
|
$ruby << " -I'$(top_srcdir)/lib'"
|
||||||
|
$ruby << " -I'$(extout)/$(arch)' -I'$(extout)/common'" if $extout
|
||||||
|
$ruby << " -I'$(top_srcdir)/ext' -rpurelib.rb"
|
||||||
|
ENV["RUBYLIB"] = "-"
|
||||||
|
ENV["RUBYOPT"] = "-rpurelib.rb"
|
||||||
|
end
|
||||||
$config_h = '$(arch_hdrdir)/ruby/config.h'
|
$config_h = '$(arch_hdrdir)/ruby/config.h'
|
||||||
ENV["RUBYLIB"] = "-"
|
$mflags << "ruby=#$ruby"
|
||||||
ENV["RUBYOPT"] = "-rpurelib.rb"
|
|
||||||
|
|
||||||
MTIMES = [__FILE__, 'rbconfig.rb', srcdir+'/lib/mkmf.rb'].collect {|f| File.mtime(f)}
|
MTIMES = [__FILE__, 'rbconfig.rb', srcdir+'/lib/mkmf.rb'].collect {|f| File.mtime(f)}
|
||||||
|
|
||||||
|
@ -398,12 +403,12 @@ else
|
||||||
elsif (w = w.grep(String)).empty?
|
elsif (w = w.grep(String)).empty?
|
||||||
proc {true}
|
proc {true}
|
||||||
else
|
else
|
||||||
w.collect {|o| o.split(/,/)}.flatten.method(:any?)
|
proc {|c1| w.collect {|o| o.split(/,/)}.flatten.any?(&c1)}
|
||||||
end
|
end
|
||||||
}
|
}
|
||||||
cond = proc {|ext|
|
cond = proc {|ext, *|
|
||||||
cond1 = proc {|n| File.fnmatch(n, ext, File::FNM_PATHNAME)}
|
cond1 = proc {|n| File.fnmatch(n, ext)}
|
||||||
withes.call(&cond1) or !withouts.call(&cond1)
|
withes.call(cond1) or !withouts.call(cond1)
|
||||||
}
|
}
|
||||||
exts |= Dir.glob("#{ext_prefix}/*/**/extconf.rb").collect {|d|
|
exts |= Dir.glob("#{ext_prefix}/*/**/extconf.rb").collect {|d|
|
||||||
d = File.dirname(d)
|
d = File.dirname(d)
|
||||||
|
@ -550,7 +555,7 @@ if $nmake == ?b
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
$mflags.unshift("topdir=#$topdir")
|
$mflags.unshift("topdir=#$topdir")
|
||||||
ENV["RUBYOPT"] = ''
|
ENV.delete("RUBYOPT")
|
||||||
system($make, *sysquote($mflags)) or exit($?.exitstatus)
|
system($make, *sysquote($mflags)) or exit($?.exitstatus)
|
||||||
|
|
||||||
#Local variables:
|
#Local variables:
|
||||||
|
|
|
@ -1316,7 +1316,7 @@ def depend_rules(depend)
|
||||||
implicit = [[m[1], m[2]], [m.post_match]]
|
implicit = [[m[1], m[2]], [m.post_match]]
|
||||||
next
|
next
|
||||||
elsif RULE_SUBST and /\A(?!\s*\w+\s*=)[$\w][^#]*:/ =~ line
|
elsif RULE_SUBST and /\A(?!\s*\w+\s*=)[$\w][^#]*:/ =~ line
|
||||||
line.gsub!(%r"(?<=\s)(?![./\\])([^$(){}+=:\s,]+)(?=\s|\z)", &RULE_SUBST.method(:%))
|
line.gsub!(%r"(\s)(?!\.)([^$(){}+=:\s\/\\,]+)(?=\s|\z)") {$1 + RULE_SUBST % $2}
|
||||||
end
|
end
|
||||||
depout << line
|
depout << line
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,7 +1,7 @@
|
||||||
#define RUBY_VERSION "1.9.0"
|
#define RUBY_VERSION "1.9.0"
|
||||||
#define RUBY_RELEASE_DATE "2008-02-26"
|
#define RUBY_RELEASE_DATE "2008-02-27"
|
||||||
#define RUBY_VERSION_CODE 190
|
#define RUBY_VERSION_CODE 190
|
||||||
#define RUBY_RELEASE_CODE 20080226
|
#define RUBY_RELEASE_CODE 20080227
|
||||||
#define RUBY_PATCHLEVEL 0
|
#define RUBY_PATCHLEVEL 0
|
||||||
|
|
||||||
#define RUBY_VERSION_MAJOR 1
|
#define RUBY_VERSION_MAJOR 1
|
||||||
|
@ -9,7 +9,7 @@
|
||||||
#define RUBY_VERSION_TEENY 0
|
#define RUBY_VERSION_TEENY 0
|
||||||
#define RUBY_RELEASE_YEAR 2008
|
#define RUBY_RELEASE_YEAR 2008
|
||||||
#define RUBY_RELEASE_MONTH 2
|
#define RUBY_RELEASE_MONTH 2
|
||||||
#define RUBY_RELEASE_DAY 26
|
#define RUBY_RELEASE_DAY 27
|
||||||
|
|
||||||
#ifdef RUBY_EXTERN
|
#ifdef RUBY_EXTERN
|
||||||
RUBY_EXTERN const char ruby_version[];
|
RUBY_EXTERN const char ruby_version[];
|
||||||
|
|
Загрузка…
Ссылка в новой задаче