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 | 6ef85bd9f083dceab0e50d3c7bdf351443507f38 (patch) | |
tree | ea3d4ecc483f835084e8a4399700dca2ef976c12 /mkconfig.rb | |
parent | d3e8c1c66178864e0c6d0eb18bafb59ef3648f05 (diff) | |
download | ruby-6ef85bd9f083dceab0e50d3c7bdf351443507f38.tar.gz ruby-6ef85bd9f083dceab0e50d3c7bdf351443507f38.tar.xz ruby-6ef85bd9f083dceab0e50d3c7bdf351443507f38.zip |
* 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: http://svn.ruby-lang.org/repos/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 473c592c5..5eb0b18d1 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 |