summaryrefslogtreecommitdiff
path: root/mkconfig.rb
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-02-17 14:46:44 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2002-02-17 14:46:44 +0000
commit21d0c3b815b16713b31522c14ebb52e815224ec3 (patch)
treeea3d4ecc483f835084e8a4399700dca2ef976c12 /mkconfig.rb
parent11829a5368447bf4829fc040498457763d52a9b3 (diff)
* 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.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/mkconfig.rb b/mkconfig.rb
index 473c592..5eb0b18 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