ruby-changes:28738
From: nobu <ko1@a...>
Date: Thu, 16 May 2013 22:36:02 +0900 (JST)
Subject: [ruby-changes:28738] nobu:r40790 (trunk): * template/verconf.h.in: unexpand exec_prefix.
nobu 2013-05-16 22:35:44 +0900 (Thu, 16 May 2013) New Revision: 40790 http://svn.ruby-lang.org/cgi-bin/viewvc.cgi?view=rev&revision=40790 Log: * template/verconf.h.in: unexpand exec_prefix. Modified files: trunk/template/verconf.h.in Index: template/verconf.h.in =================================================================== --- template/verconf.h.in (revision 40789) +++ template/verconf.h.in (revision 40790) @@ -49,9 +49,13 @@ https://github.com/ruby/ruby/blob/trunk/template/verconf.h.in#L49 % R["rubysitearchprefix"] = '"RUBY_SITEARCH_PREFIX_FOR(arch)"' % R["exec_prefix"] = '"RUBY_EXEC_PREFIX"' % R["prefix"] = '"RUBY_EXEC_PREFIX"' +% exec_prefix_pat = /\A"#{Regexp.quote(RbConfig::CONFIG['exec_prefix'])}(?=\/|\z)/ % _erbout.gsub!(/^(#define\s+(\S+)\s+)(.*)/) { % pre, name, repl = $1, $2, $3 % pat = %["#{name}"] % c = C.merge(R.reject {|key, value| key == name or value.include?(pat)}) -% pre + RbConfig.expand(repl, c).gsub(/^""(?!$)|(.)""$/, '\1') +% RbConfig.expand(repl, c) +% repl.gsub!(/^""(?!$)|(.)""$/, '\1') +% repl.sub!(exec_prefix_pat, 'RUBY_EXEC_PREFIX"') +% pre + repl % } -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/