* mkconfig.rb, ext/configsub.rb: VERSION -> RUBY_VERSION.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1480 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
eban 2001-05-31 04:40:37 +00:00
Родитель a0047c7d89
Коммит ac41cd6844
3 изменённых файлов: 9 добавлений и 5 удалений

Просмотреть файл

@ -1,3 +1,7 @@
Thu May 31 13:30:25 2001 WATANABE Hirofumi <eban@ruby-lang.org>
* mkconfig.rb, ext/configsub.rb: VERSION -> RUBY_VERSION.
Thu May 31 08:00:58 2001 Usaku Nakamura <usa@osb.att.ne.jp> Thu May 31 08:00:58 2001 Usaku Nakamura <usa@osb.att.ne.jp>
* win32/dir.h: re-add. * win32/dir.h: re-add.

Просмотреть файл

@ -3,7 +3,7 @@
BEGIN { BEGIN {
CONFIG = {} CONFIG = {}
VERSION.scan(/(\d+)\.(\d+)\.(\d+)/) do RUBY_VERSION.scan(/(\d+)\.(\d+)\.(\d+)/) do
# overridden if config.status has version # overridden if config.status has version
CONFIG['MAJOR'] = $1 CONFIG['MAJOR'] = $1
CONFIG['MINOR'] = $2 CONFIG['MINOR'] = $2

Просмотреть файл

@ -6,7 +6,7 @@ rbconfig_rb = ARGV[0] || 'rbconfig.rb'
srcdir = $srcdir if $srcdir srcdir = $srcdir if $srcdir
File.makedirs(File.dirname(rbconfig_rb), true) File.makedirs(File.dirname(rbconfig_rb), true)
version = VERSION version = RUBY_VERSION
config = open(rbconfig_rb, "w") config = open(rbconfig_rb, "w")
$stdout.reopen(config) $stdout.reopen(config)
@ -14,8 +14,8 @@ fast = {'prefix'=>TRUE, 'ruby_install_name'=>TRUE, 'INSTALL'=>TRUE, 'EXEEXT'=>TR
print %[ print %[
module Config module Config
VERSION == "#{version}" or RUBY_VERSION == "#{version}" or
raise "ruby lib version (#{version}) doesn't match executable version (\#{VERSION})" raise "ruby lib version (#{version}) doesn't match executable version (\#{RUBY_VERSION})"
# This file was created by configrb when ruby was built. Any changes # This file was created by configrb when ruby was built. Any changes
# made to this file will be lost the next time ruby is built. # made to this file will be lost the next time ruby is built.
@ -62,7 +62,7 @@ if not has_srcdir
end end
if not has_version if not has_version
VERSION.scan(/(\d+)\.(\d+)\.(\d+)/) { RUBY_VERSION.scan(/(\d+)\.(\d+)\.(\d+)/) {
print " CONFIG[\"MAJOR\"] = \"" + $1 + "\"\n" print " CONFIG[\"MAJOR\"] = \"" + $1 + "\"\n"
print " CONFIG[\"MINOR\"] = \"" + $2 + "\"\n" print " CONFIG[\"MINOR\"] = \"" + $2 + "\"\n"
print " CONFIG[\"TEENY\"] = \"" + $3 + "\"\n" print " CONFIG[\"TEENY\"] = \"" + $3 + "\"\n"