summaryrefslogtreecommitdiff
path: root/jni/ruby/tool/expand-config.rb
blob: fb2edd02e8a87a2ae97248c7ccd779aa2a2c57b4 (plain)
1
2
3
4
5
6
7
STDOUT.binmode
ARGF.each do |line|
  line.gsub!(/@([a-z_]\w*)@/i) {
    (RbConfig::MAKEFILE_CONFIG[$1] or "").gsub(/\$\((.+?)\)/, %Q[${\\1}])
  }
  puts line
end