Skip to content

Commit

Permalink
expand-config.rb: expand config values
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
nobu committed Dec 27, 2013
1 parent 07dcd43 commit bb4a1ac
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 5 deletions.
7 changes: 7 additions & 0 deletions tool/expand-config.rb
Original file line number Diff line number Diff line change
@@ -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
6 changes: 1 addition & 5 deletions win32/Makefile.sub
Original file line number Diff line number Diff line change
Expand Up @@ -1053,11 +1053,7 @@ end
<<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:
Expand Down

0 comments on commit bb4a1ac

Please sign in to comment.