1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

* 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:
nobu 2008-02-26 18:56:00 +00:00
parent 99e8314b3b
commit 9d014dc254
5 changed files with 38 additions and 25 deletions

View file

@ -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>
* misc/ruby-mode.el (ruby-calculate-indent): should distinguish

View file

@ -1,10 +1,10 @@
#! ./miniruby
dir = File.expand_path("../..", __FILE__)
$:.unshift(File.join(dir, "lib"))
$:.unshift(dir)
$:.unshift(".")
require 'mkmf'
$" << "mkmf.rb"
load File.expand_path("lib/mkmf.rb", dir)
require 'erb'
if /--builtin-encs=/ =~ ARGV[0]

View file

@ -24,17 +24,18 @@ alias $0 $progname
$extlist = []
$compiled = {}
$:.replace([Dir.pwd])
require 'rbconfig'
srcdir = File.dirname(File.dirname(__FILE__))
$:.unshift(srcdir, File.expand_path("lib", srcdir))
unless defined?(CROSS_COMPILING) and CROSS_COMPILING
$:.replace([File.expand_path("lib", srcdir), Dir.pwd])
end
$:.unshift(srcdir)
require 'rbconfig'
$topdir = "."
$top_srcdir = srcdir
require 'mkmf'
$" << "mkmf.rb"
load File.expand_path("lib/mkmf.rb", srcdir)
require 'optparse/shellwords'
def sysquote(x)
@ -60,7 +61,7 @@ def extract_makefile(makefile, keep = true)
unless installrb.empty?
config = CONFIG.dup
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
return false
@ -287,7 +288,7 @@ def parse_args()
$mflags.unshift(*rest) unless rest.empty?
def $mflags.set?(flag)
grep(/\A-(?!-).*#{'%s' % flag}/i) { return true }
grep(/\A-(?!-).*#{flag.chr}/i) { return true }
false
end
def $mflags.defined?(var)
@ -337,18 +338,22 @@ end
EXEEXT = CONFIG['EXEEXT']
if CROSS_COMPILING
$ruby = CONFIG['MINIRUBY']
$ruby = $mflags.defined?("MINIRUBY") || CONFIG['MINIRUBY']
elsif sep = config_string('BUILD_FILE_SEPARATOR')
$ruby = "$(topdir:/=#{sep})#{sep}miniruby" + EXEEXT
else
$ruby = '$(topdir)/miniruby' + EXEEXT
end
$ruby << " -I'$(topdir)' -I'$(top_srcdir)/lib'"
$ruby << " -I'$(extout)/$(arch)' -I'$(extout)/common'" if $extout
$ruby << " -I'$(top_srcdir)/ext' -rpurelib.rb"
$ruby << " -I'$(topdir)'"
unless CROSS_COMPILING
$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'
ENV["RUBYLIB"] = "-"
ENV["RUBYOPT"] = "-rpurelib.rb"
$mflags << "ruby=#$ruby"
MTIMES = [__FILE__, 'rbconfig.rb', srcdir+'/lib/mkmf.rb'].collect {|f| File.mtime(f)}
@ -398,12 +403,12 @@ else
elsif (w = w.grep(String)).empty?
proc {true}
else
w.collect {|o| o.split(/,/)}.flatten.method(:any?)
proc {|c1| w.collect {|o| o.split(/,/)}.flatten.any?(&c1)}
end
}
cond = proc {|ext|
cond1 = proc {|n| File.fnmatch(n, ext, File::FNM_PATHNAME)}
withes.call(&cond1) or !withouts.call(&cond1)
cond = proc {|ext, *|
cond1 = proc {|n| File.fnmatch(n, ext)}
withes.call(cond1) or !withouts.call(cond1)
}
exts |= Dir.glob("#{ext_prefix}/*/**/extconf.rb").collect {|d|
d = File.dirname(d)
@ -550,7 +555,7 @@ if $nmake == ?b
end
end
$mflags.unshift("topdir=#$topdir")
ENV["RUBYOPT"] = ''
ENV.delete("RUBYOPT")
system($make, *sysquote($mflags)) or exit($?.exitstatus)
#Local variables:

View file

@ -1316,7 +1316,7 @@ def depend_rules(depend)
implicit = [[m[1], m[2]], [m.post_match]]
next
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
depout << line
end

View file

@ -1,7 +1,7 @@
#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_RELEASE_CODE 20080226
#define RUBY_RELEASE_CODE 20080227
#define RUBY_PATCHLEVEL 0
#define RUBY_VERSION_MAJOR 1
@ -9,7 +9,7 @@
#define RUBY_VERSION_TEENY 0
#define RUBY_RELEASE_YEAR 2008
#define RUBY_RELEASE_MONTH 2
#define RUBY_RELEASE_DAY 26
#define RUBY_RELEASE_DAY 27
#ifdef RUBY_EXTERN
RUBY_EXTERN const char ruby_version[];