summaryrefslogtreecommitdiff
path: root/mkconfig.rb
diff options
context:
space:
mode:
authormatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-12-02 06:58:52 +0000
committermatz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>1999-12-02 06:58:52 +0000
commit4263bb432accd9bd98654c3e8cc312414e7db906 (patch)
tree2181988d0bc04e5acdc239c390c59fad2796cc64 /mkconfig.rb
parenta3f29338ad53c1027eeef0d3c7168d3355105d20 (diff)
19991292
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'mkconfig.rb')
-rw-r--r--mkconfig.rb10
1 files changed, 8 insertions, 2 deletions
diff --git a/mkconfig.rb b/mkconfig.rb
index 093d023..671e9bd 100644
--- a/mkconfig.rb
+++ b/mkconfig.rb
@@ -75,15 +75,21 @@ end
print v_fast, v_others
print <<EOS
CONFIG["compile_dir"] = "#{Dir.pwd}"
- CONFIG.each_value do |val|
+ MAKEFILE_CONFIG = {}
+ CONFIG.each{|k,v| MAKEFILE_CONFIG[k] = v.dup}
+ def Config::expand(val)
val.gsub!(/\\$\\(([^()]+)\\)/) do |var|
key = $1
if CONFIG.key? key
- "\#{CONFIG[\\\"\#{key}\\\"]}"
+ "\#{Config::expand(CONFIG[\\\"\#{key}\\\"])}"
else
var
end
end
+ val
+ end
+ CONFIG.each_value do |val|
+ Config::expand(val)
end
end
EOS