diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-02-17 14:46:44 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2002-02-17 14:46:44 +0000 |
commit | 21d0c3b815b16713b31522c14ebb52e815224ec3 (patch) | |
tree | ea3d4ecc483f835084e8a4399700dca2ef976c12 /mkconfig.rb | |
parent | 11829a5368447bf4829fc040498457763d52a9b3 (diff) | |
download | ruby-21d0c3b815b16713b31522c14ebb52e815224ec3.tar.gz |
* mkconfig.rb (Config::expand): expand ${} too.
* ext/extmk.rb.in (try_link0): expand command.
* ext/extmk.rb.in (try_cpp): ditto.
* ext/extmk.rb.in (extmake): default $LIBPATH to $libdir
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@2079 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'mkconfig.rb')
-rw-r--r-- | mkconfig.rb | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/mkconfig.rb b/mkconfig.rb index 473c592c5b..5eb0b18d1c 100644 --- a/mkconfig.rb +++ b/mkconfig.rb @@ -96,10 +96,9 @@ print <<EOS 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]) + val.gsub!(/\\$\\(([^()]+)\\)|\\$\\{([^{}]+)\\}/) do |var| + if key = CONFIG[$1 || $2] + Config::expand(key) else var end |