* 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/trunk@21982 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
04ae31eb24
commit
28155915a5
@ -1,3 +1,8 @@
|
|||||||
|
Tue Feb 3 07:01:21 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
|
* mkconfig.rb (patchlevel): config.status may not contain
|
||||||
|
PATCHLEVEL even if other version numbers exist.
|
||||||
|
|
||||||
Mon Feb 2 23:43:00 2009 Tanaka Akira <akr@fsij.org>
|
Mon Feb 2 23:43:00 2009 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
* ext/socket/raddrinfo.c (Init_addrinfo): add AddrInfo#to_s as an
|
* ext/socket/raddrinfo.c (Init_addrinfo): add AddrInfo#to_s as an
|
||||||
|
10
mkconfig.rb
10
mkconfig.rb
@ -38,6 +38,7 @@ v_fast = []
|
|||||||
v_others = []
|
v_others = []
|
||||||
vars = {}
|
vars = {}
|
||||||
has_version = false
|
has_version = false
|
||||||
|
has_patchlevel = false
|
||||||
continued_name = nil
|
continued_name = nil
|
||||||
continued_line = nil
|
continued_line = nil
|
||||||
File.foreach "config.status" do |line|
|
File.foreach "config.status" do |line|
|
||||||
@ -95,7 +96,12 @@ File.foreach "config.status" do |line|
|
|||||||
else
|
else
|
||||||
v_others << v
|
v_others << v
|
||||||
end
|
end
|
||||||
has_version = true if name == "MAJOR"
|
case name
|
||||||
|
when "MAJOR"
|
||||||
|
has_version = true
|
||||||
|
when "PATCHLEVEL"
|
||||||
|
has_patchlevel = true
|
||||||
|
end
|
||||||
end
|
end
|
||||||
# break if /^CEOF/
|
# break if /^CEOF/
|
||||||
end
|
end
|
||||||
@ -114,6 +120,8 @@ unless has_version
|
|||||||
print " CONFIG[\"MINOR\"] = \"" + $2 + "\"\n"
|
print " CONFIG[\"MINOR\"] = \"" + $2 + "\"\n"
|
||||||
print " CONFIG[\"TEENY\"] = \"" + $3 + "\"\n"
|
print " CONFIG[\"TEENY\"] = \"" + $3 + "\"\n"
|
||||||
}
|
}
|
||||||
|
end
|
||||||
|
unless has_patchlevel
|
||||||
patchlevel = IO.foreach(File.join(srcdir, "version.h")) {|l|
|
patchlevel = IO.foreach(File.join(srcdir, "version.h")) {|l|
|
||||||
m = /^\s*#\s*define\s+RUBY_PATCHLEVEL\s+(-?\d+)/.match(l) and break m[1]
|
m = /^\s*#\s*define\s+RUBY_PATCHLEVEL\s+(-?\d+)/.match(l) and break m[1]
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user