ruby-changes:32369
From: nobu <ko1@a...>
Date: Fri, 27 Dec 2013 14:46:20 +0900 (JST)
Subject: [ruby-changes:32369] nobu:r44448 (trunk): expand-config.rb: expand config values
nobu 2013-12-27 14:46:10 +0900 (Fri, 27 Dec 2013) New Revision: 44448 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=44448 Log: 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. Added files: trunk/tool/expand-config.rb Modified files: trunk/win32/Makefile.sub Index: win32/Makefile.sub =================================================================== --- win32/Makefile.sub (revision 44447) +++ win32/Makefile.sub (revision 44448) @@ -1053,11 +1053,7 @@ end https://github.com/ruby/ruby/blob/trunk/win32/Makefile.sub#L1053 <<KEEP $(ruby_pc): $(RBCONFIG) - @$(MINIRUBY) -r./rbconfig -p \ - -e 'STDOUT.binmode' \ - -e '$$_.gsub!(/@([a-z_]\w*)@/i) {' \ - -e '(RbConfig::MAKEFILE_CONFIG[$$1] or "").gsub(/\$$\((.+?)\)/, %Q[$${\\1}])' \ - -e '}' \ + @$(MINIRUBY) -r./rbconfig $(srcdir)/tool/expand-config.rb \ $(srcdir)/template/ruby.pc.in > $@ {$(srcdir)/enc}.c.obj: Index: tool/expand-config.rb =================================================================== --- tool/expand-config.rb (revision 0) +++ tool/expand-config.rb (revision 44448) @@ -0,0 +1,7 @@ https://github.com/ruby/ruby/blob/trunk/tool/expand-config.rb#L1 +STDOUT.binmode +ARGF.each do |line| + line.gsub!(/@([a-z_]\w*)@/i) { + (RbConfig::MAKEFILE_CONFIG[$1] or "").gsub(/\$\((.+?)\)/, %Q[${\\1}]) + } + puts line +end Property changes on: tool/expand-config.rb ___________________________________________________________________ Added: svn:eol-style + LF Added: svn:executable + * -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/