diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-12-27 05:46:10 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-12-27 05:46:10 +0000 |
commit | bb4a1ac9b02a7fd35a5c6cbc107cded94371fd69 (patch) | |
tree | bea8a79de90d413e9690f5c5fe8bcf7ab47c104a /tool | |
parent | 07dcd43a0a2752f8403ddd08a321fc8d4baa5385 (diff) | |
download | bundler-bb4a1ac9b02a7fd35a5c6cbc107cded94371fd69.tar.gz |
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
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 |