summaryrefslogtreecommitdiff
path: root/mkconfig.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-02-28 17:05:18 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2007-02-28 17:05:18 +0000
commite9401bcdab7e9e5035eb517738f8b317996d858d (patch)
tree01fefef323974219bb4b8ea0ed62fc87816d4534 /mkconfig.rb
parentd8ecc168f1422ee6846dce6c75898a84ee18028c (diff)
* mkconfig.rb (patchlevel): read from version.h.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_8@11946 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'mkconfig.rb')
-rwxr-xr-xmkconfig.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/mkconfig.rb b/mkconfig.rb
index b47b742..fdc3dcf 100755
--- a/mkconfig.rb
+++ b/mkconfig.rb
@@ -112,7 +112,10 @@ unless has_version
print " CONFIG[\"MINOR\"] = \"" + $2 + "\"\n"
print " CONFIG[\"TEENY\"] = \"" + $3 + "\"\n"
}
- print " CONFIG[\"PATCHLEVEL\"] = \"" + RUBY_PATCHLEVEL + "\"\n"
+ patchlevel = IO.foreach(File.join(srcdir, "version.h")) {|l|
+ m = /^\s*#\s*define\s+RUBY_PATCHLEVEL\s+(\d+)/.match(l) and break m[1]
+ }
+ print " CONFIG[\"PATCHLEVEL\"] = \"#{patchlevel}\"\n"
end
dest = drive ? /= \"(?!\$[\(\{])(?:[a-z]:)?/i : /= \"(?!\$[\(\{])/