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:
parent
f57adf7b5b
commit
24d623e13d
2 changed files with 14 additions and 1 deletions
|
@ -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>
|
Fri Mar 13 19:40:10 2009 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||||
|
|
||||||
* common.mk (EXTMK_ARGS): needs MINIRUBY for cross-compile.
|
* common.mk (EXTMK_ARGS): needs MINIRUBY for cross-compile.
|
||||||
|
|
10
mkconfig.rb
10
mkconfig.rb
|
@ -37,6 +37,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|
|
||||||
|
@ -94,7 +95,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
|
||||||
|
@ -113,6 +119,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…
Add table
Reference in a new issue