diff options
author | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-05-16 07:15:48 +0000 |
---|---|---|
committer | nobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e> | 2013-05-16 07:15:48 +0000 |
commit | 49d37e6edc41d58208f671da0a4697a271eedb9d (patch) | |
tree | 968cf02018c4927892cb02d9d3096af5701e69ed /template | |
parent | f13a0a4ddaad8131e9fe0a4e74108578d8a098a3 (diff) | |
download | ruby-49d37e6edc41d58208f671da0a4697a271eedb9d.tar.gz |
verconf.h: fix for default prefix
* configure.in, template/verconf.h.in (RUBY_EXEC_PREFIX): fix for
default prefix.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@40782 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'template')
-rw-r--r-- | template/verconf.h.in | 18 |
1 files changed, 10 insertions, 8 deletions
diff --git a/template/verconf.h.in b/template/verconf.h.in index a97cf309d5..83e2ca4920 100644 --- a/template/verconf.h.in +++ b/template/verconf.h.in @@ -1,18 +1,19 @@ % require './rbconfig' -% C = RbConfig::MAKEFILE_CONFIG -% -% verconf = +% C = RbConfig::MAKEFILE_CONFIG.dup +% def C.[](name) str = super and (str unless str.empty?); end #define RUBY_BASE_NAME "${RUBY_BASE_NAME}" #define RUBY_VERSION_NAME RUBY_BASE_NAME"-"RUBY_LIB_VERSION % if C["RUBY_LIB_VERSION_STYLE"] #define RUBY_LIB_VERSION_STYLE ${RUBY_LIB_VERSION_STYLE} +% elsif !C["RUBY_LIB_VERSION"] +#define RUBY_LIB_VERSION_STYLE 3 /* full */ % else #define RUBY_LIB_VERSION ${RUBY_LIB_VERSION} % end -#define RUBY_EXEC_PREFIX "${RUBY_EXEC_PREFIX}" +#define RUBY_EXEC_PREFIX "<%='${RUBY_EXEC_PREFIX}' if C['RUBY_EXEC_PREFIX']%>" #define RUBY_LIB_PREFIX "${rubylibprefix}" -% unless C["sitearch"] == '$(arch)' -#define RUBY_SITEARCH "${sitearch}" +% unless (sitearch = C["sitearch"]) == '$(arch)' +#define RUBY_SITEARCH "<%=sitearch%>" % end #define RUBY_ARCH_PREFIX_FOR(arch) "${rubyarchprefix}" #define RUBY_SITEARCH_PREFIX_FOR(arch) "${rubysitearchprefix}" @@ -30,7 +31,7 @@ #define RUBY_VENDOR_LIB "${vendordir}" #define RUBY_VENDOR_ARCH_LIB_FOR(arch) "${vendorarchdir}" % end -% unless C["RUBY_SEARCH_PATH"] == "" +% if C["RUBY_SEARCH_PATH"] #define RUBY_SEARCH_PATH "${RUBY_SEARCH_PATH}" % end % @@ -47,7 +48,8 @@ % R["rubyarchprefix"] = '"RUBY_ARCH_PREFIX_FOR(arch)"' % R["rubysitearchprefix"] = '"RUBY_SITEARCH_PREFIX_FOR(arch)"' % R["exec_prefix"] = '"RUBY_EXEC_PREFIX"' -% verconf.gsub!(/^(#define\s+(\S+)\s+)(.*)/) { +% R["prefix"] = '"RUBY_EXEC_PREFIX"' +% _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)}) |