summaryrefslogtreecommitdiffstats
path: root/mkconfig.rb
diff options
context:
space:
mode:
authoreban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-07-31 09:43:14 +0000
committereban <eban@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2000-07-31 09:43:14 +0000
commit7e74039572825048f021214f746badb938d65694 (patch)
tree012072c4c02e464187099fb05c8fbc257461db1f /mkconfig.rb
parentc088d88e5a4792a33321d4973f6b17036ae35427 (diff)
downloadruby-7e74039572825048f021214f746badb938d65694.tar.gz
ruby-7e74039572825048f021214f746badb938d65694.tar.xz
ruby-7e74039572825048f021214f746badb938d65694.zip
eban
git-svn-id: http://svn.ruby-lang.org/repos/ruby/trunk@864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'mkconfig.rb')
-rw-r--r--mkconfig.rb17
1 files changed, 16 insertions, 1 deletions
diff --git a/mkconfig.rb b/mkconfig.rb
index c83e5f8d8..2e346c15a 100644
--- a/mkconfig.rb
+++ b/mkconfig.rb
@@ -83,7 +83,22 @@ end
print v_fast, v_others
print <<EOS
CONFIG["compile_dir"] = "#{Dir.pwd}"
- MAKEFILE_CONFIG = CONFIG.dup
+ 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::expand(CONFIG[\\\"\#{key}\\\"])}"
+ else
+ var
+ end
+ end
+ val
+ end
+ CONFIG.each_value do |val|
+ Config::expand(val)
+ end
end
EOS
config.close