diff options
Diffstat (limited to 'tool')
-rwxr-xr-x | tool/expand-config.rb | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/tool/expand-config.rb b/tool/expand-config.rb new file mode 100755 index 0000000000..fb2edd02e8 --- /dev/null +++ b/tool/expand-config.rb @@ -0,0 +1,7 @@ +STDOUT.binmode +ARGF.each do |line| + line.gsub!(/@([a-z_]\w*)@/i) { + (RbConfig::MAKEFILE_CONFIG[$1] or "").gsub(/\$\((.+?)\)/, %Q[${\\1}]) + } + puts line +end |