summaryrefslogtreecommitdiff
path: root/mkconfig.rb
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-05-08 08:29:58 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2001-05-08 08:29:58 +0000
commitd57ab818775f37f3ee6221d4c609c7890350938c (patch)
tree2e1aa0d2410beab12cb96afbe06b28e96d141e60 /mkconfig.rb
parent998b538f77ce9e5c347ede9b4d22f50015a2914e (diff)
* eval.c (is_defined): core dumped during instance_eval for
special constants. * eval.c (rb_eval): ditto git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/branches/ruby_1_6@1383 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 c190861b5e..950cb5f6c3 100644
--- a/mkconfig.rb
+++ b/mkconfig.rb
@@ -40,7 +40,7 @@ File.foreach "config.status" do |$_|
next if $so_name and name =~ /^RUBY_SO_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