1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00
ruby--ruby/tool/expand-config.rb
nobu bb4a1ac9b0 expand-config.rb: expand config values
* tool/expand-config.rb: expand config values, extracted from
  win32/Makefile.sub.

* win32/Makefile.sub (ruby_pc): use tool/expand-config.rb script.

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@44448 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
2013-12-27 05:46:10 +00:00

7 lines
162 B
Ruby
Executable file

STDOUT.binmode
ARGF.each do |line|
line.gsub!(/@([a-z_]\w*)@/i) {
(RbConfig::MAKEFILE_CONFIG[$1] or "").gsub(/\$\((.+?)\)/, %Q[${\\1}])
}
puts line
end