summaryrefslogtreecommitdiff
path: root/mkconfig.rb
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-07-28 09:26:53 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-07-28 09:26:53 +0000
commit16adedaa6d6ceb8e3f21e33dc6653aed3ffa6932 (patch)
treed1c104d8b5e197b22830a2c37f84327de76586b3 /mkconfig.rb
parent7dcd244615f172994ca4af37108af7ff744d0998 (diff)
990728
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_3@501 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'mkconfig.rb')
-rw-r--r--mkconfig.rb12
1 files changed, 11 insertions, 1 deletions
diff --git a/mkconfig.rb b/mkconfig.rb
index 400f769..093d023 100644
--- a/mkconfig.rb
+++ b/mkconfig.rb
@@ -9,7 +9,7 @@ version = VERSION
config = open(rbconfig_rb, "w")
$stdout.reopen(config)
-fast = {'prefix'=>TRUE, 'INSTALL'=>TRUE, 'binsuffix'=>TRUE}
+fast = {'prefix'=>TRUE, 'INSTALL'=>TRUE, 'EXEEXT'=>TRUE}
print %[
module Config
@@ -23,6 +23,7 @@ module Config
print " CONFIG = {}\n"
v_fast = []
v_others = []
+has_version = false
File.foreach "config.status" do |$_|
next if /^#/
if /^s%@program_transform_name@%s,(.*)%g$/
@@ -41,6 +42,7 @@ File.foreach "config.status" do |$_|
else
v_others << v
end
+ has_version = true if name == "MAJOR"
if /DEFS/
val.split(/\s*-D/).each do |i|
if i =~ /(.*)=(\\")?([^\\]*)(\\")?/
@@ -62,6 +64,14 @@ File.foreach "config.status" do |$_|
# break if /^CEOF/
end
+if not has_version
+ VERSION.scan(/(\d+)\.(\d+)\.(\d+)/) {
+ print " CONFIG[\"MAJOR\"] = \"" + $1 + "\"\n"
+ print " CONFIG[\"MINOR\"] = \"" + $2 + "\"\n"
+ print " CONFIG[\"TEENY\"] = \"" + $3 + "\"\n"
+ }
+end
+
print v_fast, v_others
print <<EOS
CONFIG["compile_dir"] = "#{Dir.pwd}"