mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* ext/extmk.rb (extmake): save all CONFIG values.
* ext/extmk.rb (extmake): remove mkmf.log at clean, and extconf.h at distclean, respectively. * ext/extmk.rb: remove rdoc at clean, and installed list file at distclean, respectively. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8_6@13212 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
d9e196fd3d
commit
32db855fe9
3 changed files with 63 additions and 19 deletions
10
ChangeLog
10
ChangeLog
|
|
@ -1,3 +1,13 @@
|
||||||
|
Wed Aug 22 12:13:54 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* ext/extmk.rb (extmake): save all CONFIG values.
|
||||||
|
|
||||||
|
* ext/extmk.rb (extmake): remove mkmf.log at clean, and extconf.h at
|
||||||
|
distclean, respectively.
|
||||||
|
|
||||||
|
* ext/extmk.rb: remove rdoc at clean, and installed list file at
|
||||||
|
distclean, respectively.
|
||||||
|
|
||||||
Wed Aug 22 11:49:00 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
Wed Aug 22 11:49:00 2007 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* sprintf.c (rb_f_sprintf): should not check positional number as
|
* sprintf.c (rb_f_sprintf): should not check positional number as
|
||||||
|
|
|
||||||
70
ext/extmk.rb
70
ext/extmk.rb
|
|
@ -112,10 +112,10 @@ def extmake(target)
|
||||||
Dir.chdir target
|
Dir.chdir target
|
||||||
top_srcdir = $top_srcdir
|
top_srcdir = $top_srcdir
|
||||||
topdir = $topdir
|
topdir = $topdir
|
||||||
mk_srcdir = CONFIG["srcdir"]
|
hdrdir = $hdrdir
|
||||||
mk_topdir = CONFIG["topdir"]
|
|
||||||
prefix = "../" * (target.count("/")+1)
|
prefix = "../" * (target.count("/")+1)
|
||||||
$hdrdir = $top_srcdir = relative_from(top_srcdir, prefix)
|
$top_srcdir = relative_from(top_srcdir, prefix)
|
||||||
|
$hdrdir = relative_from(hdrdir, prefix)
|
||||||
$topdir = prefix + $topdir
|
$topdir = prefix + $topdir
|
||||||
$target = target
|
$target = target
|
||||||
$mdir = target
|
$mdir = target
|
||||||
|
|
@ -127,12 +127,31 @@ def extmake(target)
|
||||||
makefile = "./Makefile"
|
makefile = "./Makefile"
|
||||||
ok = File.exist?(makefile)
|
ok = File.exist?(makefile)
|
||||||
unless $ignore
|
unless $ignore
|
||||||
Config::CONFIG["hdrdir"] = $hdrdir
|
rbconfig0 = Config::CONFIG
|
||||||
Config::CONFIG["srcdir"] = $srcdir
|
mkconfig0 = CONFIG
|
||||||
Config::CONFIG["topdir"] = $topdir
|
rbconfig = {
|
||||||
CONFIG["hdrdir"] = ($hdrdir == top_srcdir) ? top_srcdir : "$(topdir)"+top_srcdir[2..-1]
|
"hdrdir" => $hdrdir,
|
||||||
CONFIG["srcdir"] = "$(hdrdir)/ext/#{$mdir}"
|
"srcdir" => $srcdir,
|
||||||
CONFIG["topdir"] = $topdir
|
"topdir" => $topdir,
|
||||||
|
}
|
||||||
|
mkconfig = {
|
||||||
|
"top_srcdir" => ($hdrdir == top_srcdir) ? top_srcdir : "$(topdir)"+top_srcdir[2..-1],
|
||||||
|
"hdrdir" => "$(top_srcdir)",
|
||||||
|
"srcdir" => "$(top_srcdir)/ext/#{$mdir}",
|
||||||
|
"topdir" => $topdir,
|
||||||
|
}
|
||||||
|
rbconfig0.each_pair {|key, val| rbconfig[key] ||= val.dup}
|
||||||
|
mkconfig0.each_pair {|key, val| mkconfig[key] ||= val.dup}
|
||||||
|
Config.module_eval {
|
||||||
|
remove_const(:CONFIG)
|
||||||
|
const_set(:CONFIG, rbconfig)
|
||||||
|
remove_const(:MAKEFILE_CONFIG)
|
||||||
|
const_set(:MAKEFILE_CONFIG, mkconfig)
|
||||||
|
}
|
||||||
|
Object.class_eval {
|
||||||
|
remove_const(:CONFIG)
|
||||||
|
const_set(:CONFIG, mkconfig)
|
||||||
|
}
|
||||||
begin
|
begin
|
||||||
$extconf_h = nil
|
$extconf_h = nil
|
||||||
ok &&= extract_makefile(makefile)
|
ok &&= extract_makefile(makefile)
|
||||||
|
|
@ -181,7 +200,11 @@ def extmake(target)
|
||||||
$ignore or $continue or return false
|
$ignore or $continue or return false
|
||||||
end
|
end
|
||||||
$compiled[target] = true
|
$compiled[target] = true
|
||||||
if $clean and $clean != true
|
if $clean
|
||||||
|
FileUtils.rm_f("mkmf.log")
|
||||||
|
if $clean != true
|
||||||
|
FileUtils.rm_f([makefile, $extconf_h || "extconf.h"])
|
||||||
|
end
|
||||||
File.unlink(makefile) rescue nil
|
File.unlink(makefile) rescue nil
|
||||||
end
|
end
|
||||||
if $static
|
if $static
|
||||||
|
|
@ -195,13 +218,21 @@ def extmake(target)
|
||||||
$extpath |= $LIBPATH
|
$extpath |= $LIBPATH
|
||||||
end
|
end
|
||||||
ensure
|
ensure
|
||||||
Config::CONFIG["srcdir"] = $top_srcdir
|
unless $ignore
|
||||||
Config::CONFIG["topdir"] = topdir
|
Config.module_eval {
|
||||||
CONFIG["srcdir"] = mk_srcdir
|
remove_const(:CONFIG)
|
||||||
CONFIG["topdir"] = mk_topdir
|
const_set(:CONFIG, rbconfig0)
|
||||||
CONFIG.delete("hdrdir")
|
remove_const(:MAKEFILE_CONFIG)
|
||||||
$hdrdir = $top_srcdir = top_srcdir
|
const_set(:MAKEFILE_CONFIG, mkconfig0)
|
||||||
|
}
|
||||||
|
Object.class_eval {
|
||||||
|
remove_const(:CONFIG)
|
||||||
|
const_set(:CONFIG, mkconfig0)
|
||||||
|
}
|
||||||
|
end
|
||||||
|
$top_srcdir = top_srcdir
|
||||||
$topdir = topdir
|
$topdir = topdir
|
||||||
|
$hdrdir = hdrdir
|
||||||
Dir.chdir dir
|
Dir.chdir dir
|
||||||
end
|
end
|
||||||
begin
|
begin
|
||||||
|
|
@ -285,6 +316,7 @@ def parse_args()
|
||||||
$continue = $mflags.set?(?k)
|
$continue = $mflags.set?(?k)
|
||||||
if $extout
|
if $extout
|
||||||
$extout = '$(topdir)/'+$extout
|
$extout = '$(topdir)/'+$extout
|
||||||
|
Config::CONFIG["extout"] = CONFIG["extout"] = $extout
|
||||||
$extout_prefix = $extout ? "$(extout)$(target_prefix)/" : ""
|
$extout_prefix = $extout ? "$(extout)$(target_prefix)/" : ""
|
||||||
$mflags << "extout=#$extout" << "extout_prefix=#$extout_prefix"
|
$mflags << "extout=#$extout" << "extout_prefix=#$extout_prefix"
|
||||||
end
|
end
|
||||||
|
|
@ -323,7 +355,7 @@ elsif sep = config_string('BUILD_FILE_SEPARATOR')
|
||||||
else
|
else
|
||||||
$ruby = '$(topdir)/miniruby' + EXEEXT
|
$ruby = '$(topdir)/miniruby' + EXEEXT
|
||||||
end
|
end
|
||||||
$ruby << " -I'$(topdir)' -I'$(hdrdir)/lib'"
|
$ruby << " -I'$(topdir)' -I'$(top_srcdir)/lib'"
|
||||||
$ruby << " -I'$(extout)/$(arch)' -I'$(extout)/common'" if $extout
|
$ruby << " -I'$(extout)/$(arch)' -I'$(extout)/common'" if $extout
|
||||||
$ruby << " -I'$(hdrdir)/ext' -rpurelib.rb"
|
$ruby << " -I'$(hdrdir)/ext' -rpurelib.rb"
|
||||||
$config_h = '$(topdir)/config.h'
|
$config_h = '$(topdir)/config.h'
|
||||||
|
|
@ -404,12 +436,14 @@ dir = Dir.pwd
|
||||||
FileUtils::makedirs('ext')
|
FileUtils::makedirs('ext')
|
||||||
Dir::chdir('ext')
|
Dir::chdir('ext')
|
||||||
|
|
||||||
|
hdrdir = $hdrdir
|
||||||
$hdrdir = $top_srcdir = relative_from(srcdir, $topdir = "..")
|
$hdrdir = $top_srcdir = relative_from(srcdir, $topdir = "..")
|
||||||
exts.each do |d|
|
exts.each do |d|
|
||||||
extmake(d) or abort
|
extmake(d) or abort
|
||||||
end
|
end
|
||||||
$hdrdir = $top_srcdir = srcdir
|
$top_srcdir = srcdir
|
||||||
$topdir = "."
|
$topdir = "."
|
||||||
|
$hdrdir = hdrdir
|
||||||
|
|
||||||
extinit = Struct.new(:c, :o) {
|
extinit = Struct.new(:c, :o) {
|
||||||
def initialize(src)
|
def initialize(src)
|
||||||
|
|
|
||||||
|
|
@ -2,7 +2,7 @@
|
||||||
#define RUBY_RELEASE_DATE "2007-08-22"
|
#define RUBY_RELEASE_DATE "2007-08-22"
|
||||||
#define RUBY_VERSION_CODE 186
|
#define RUBY_VERSION_CODE 186
|
||||||
#define RUBY_RELEASE_CODE 20070822
|
#define RUBY_RELEASE_CODE 20070822
|
||||||
#define RUBY_PATCHLEVEL 82
|
#define RUBY_PATCHLEVEL 83
|
||||||
|
|
||||||
#define RUBY_VERSION_MAJOR 1
|
#define RUBY_VERSION_MAJOR 1
|
||||||
#define RUBY_VERSION_MINOR 8
|
#define RUBY_VERSION_MINOR 8
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue