summaryrefslogtreecommitdiff
path: root/mkconfig.rb
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-05-07 09:26:29 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-05-07 09:26:29 +0000
commit13cbec33c1335c5e582360797dfce7601bf60206 (patch)
treee88cf34d1e19ece721133a8ad3582e8ed4727dc6 /mkconfig.rb
parent075169f071dbf6e71e91d3872c02e469d2a9ff72 (diff)
* parse.y (arg): "||=" should not warn for uninitialized instance
variables. * eval.c (rb_eval): ditto. * eval.c (eval): preserve and restore ruby_cref as well. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@1371 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'mkconfig.rb')
-rw-r--r--mkconfig.rb9
1 files changed, 7 insertions, 2 deletions
diff --git a/mkconfig.rb b/mkconfig.rb
index 7deb6cef15..721cd3f67d 100644
--- a/mkconfig.rb
+++ b/mkconfig.rb
@@ -40,7 +40,7 @@ File.foreach "config.status" do |line|
next if $so_name and /^RUBY_SO_NAME$/ =~ name
v = " CONFIG[\"" + name + "\"] = " +
val.sub(/^\s*(.*)\s*$/, '"\1"').gsub(/\$\{?(\w+)\}?/) {
- "\#{CONFIG[\\\"#{$1}\\\"]}"
+ "$(#{$1})"
} + "\n"
if fast[name]
v_fast << v
@@ -89,6 +89,11 @@ end
print v_fast, v_others
print <<EOS
+ CONFIG["ruby_version"] = "$(MAJOR).$(MINOR)"
+ CONFIG["rubylibdir"] = "$(libdir)/ruby/$(ruby_version)"
+ CONFIG["archdir"] = "$(rubylibdir)/$(arch)"
+ CONFIG["sitelibdir"] = "$(sitedir)/$(ruby_version)"
+ CONFIG["sitearchdir"] = "$(sitelibdir)/$(arch)"
CONFIG["compile_dir"] = "#{Dir.pwd}"
MAKEFILE_CONFIG = {}
CONFIG.each{|k,v| MAKEFILE_CONFIG[k] = v.dup}
@@ -96,7 +101,7 @@ print <<EOS
val.gsub!(/\\$\\(([^()]+)\\)/) do |var|
key = $1
if CONFIG.key? key
- "\#{Config::expand(CONFIG[\\\"\#{key}\\\"])}"
+ Config::expand(CONFIG[key])
else
var
end