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

* mkconfig.rb (patchlevel): config.status may not contain

PATCHLEVEL even if other version numbers exist.


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@22932 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2009-03-13 10:41:10 +00:00
parent f57adf7b5b
commit 24d623e13d
2 changed files with 14 additions and 1 deletions

View file

@ -1,3 +1,8 @@
Fri Mar 13 19:41:09 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* mkconfig.rb (patchlevel): config.status may not contain
PATCHLEVEL even if other version numbers exist.
Fri Mar 13 19:40:10 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
* common.mk (EXTMK_ARGS): needs MINIRUBY for cross-compile.

View file

@ -37,6 +37,7 @@ v_fast = []
v_others = []
vars = {}
has_version = false
has_patchlevel = false
continued_name = nil
continued_line = nil
File.foreach "config.status" do |line|
@ -94,7 +95,12 @@ File.foreach "config.status" do |line|
else
v_others << v
end
has_version = true if name == "MAJOR"
case name
when "MAJOR"
has_version = true
when "PATCHLEVEL"
has_patchlevel = true
end
end
# break if /^CEOF/
end
@ -113,6 +119,8 @@ unless has_version
print " CONFIG[\"MINOR\"] = \"" + $2 + "\"\n"
print " CONFIG[\"TEENY\"] = \"" + $3 + "\"\n"
}
end
unless has_patchlevel
patchlevel = IO.foreach(File.join(srcdir, "version.h")) {|l|
m = /^\s*#\s*define\s+RUBY_PATCHLEVEL\s+(-?\d+)/.match(l) and break m[1]
}