diff options
author | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-12-02 06:58:52 +0000 |
---|---|---|
committer | matz <matz@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 1999-12-02 06:58:52 +0000 |
commit | 1e016f752585182c9f2c6d6bddee981244d0f1c2 (patch) | |
tree | 2181988d0bc04e5acdc239c390c59fad2796cc64 /mkconfig.rb | |
parent | fc41a9cb7df48d67eb6ee77fe8ce3f6bb3757ce4 (diff) | |
download | ruby-1e016f752585182c9f2c6d6bddee981244d0f1c2.tar.gz ruby-1e016f752585182c9f2c6d6bddee981244d0f1c2.tar.xz ruby-1e016f752585182c9f2c6d6bddee981244d0f1c2.zip |
19991292
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@574 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'mkconfig.rb')
-rw-r--r-- | mkconfig.rb | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/mkconfig.rb b/mkconfig.rb index 093d02344..671e9bdbe 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 |