summaryrefslogtreecommitdiff
path: root/template
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-05-16 13:35:44 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2013-05-16 13:35:44 +0000
commitde03518cc7bb2f95df75fd56079b1b8e757436b8 (patch)
treeccdda8a2d38e740cba1a824a92d2ed5fbf4ad639 /template
parent8416b57943539ab5267021e8cf1f61bcb5d1bcff (diff)
* template/verconf.h.in: unexpand exec_prefix.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40790 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'template')
-rw-r--r--template/verconf.h.in6
1 files changed, 5 insertions, 1 deletions
diff --git a/template/verconf.h.in b/template/verconf.h.in
index 83e2ca4..79c003e 100644
--- a/template/verconf.h.in
+++ b/template/verconf.h.in
@@ -49,9 +49,13 @@
% 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
% }