mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
eban
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@864 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
ed474caef1
commit
65cdbd0667
1 changed files with 16 additions and 1 deletions
17
mkconfig.rb
17
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
|
||||
|
|
Loading…
Reference in a new issue