1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

configure.in: sitearch

* configure.in (rubysitearchprefix): sitearchdir and vendorarchdir
  should use sitearch, not arch.  [ruby-dev:46964] [Bug #7823]


git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39202 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2013-02-11 04:17:22 +00:00
parent 507477af54
commit 0d46721033
4 changed files with 23 additions and 9 deletions

View file

@ -1,4 +1,7 @@
Mon Feb 11 13:15:11 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
Mon Feb 11 13:17:20 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
* configure.in (rubysitearchprefix): sitearchdir and vendorarchdir
should use sitearch, not arch. [ruby-dev:46964] [Bug #7823]
* win32/Makefile.sub (config.status): site and vendor directories
should use sitearch, not arch. [ruby-dev:46964] [Bug #7823]

View file

@ -3163,10 +3163,10 @@ AC_ARG_ENABLE(multiarch,
AS_HELP_STRING([--enable-multiarch], [enable multiarch compatible directories]),
[multiarch=], [unset multiarch])
archlibdir='${libdir}'${multiarch+'/${arch}'}
sitearchlibdir='${libdir}'${multiarch+'/${sitearch}'}
archincludedir='${includedir}'${multiarch+'/${arch}'}
sitearchincludedir='${includedir}'${multiarch+'/${sitearch}'}
archlibdir='${libdir}/${arch}'
sitearchlibdir='${libdir}/${sitearch}'
archincludedir='${includedir}/${arch}'
sitearchincludedir='${includedir}/${sitearch}'
shvar_to_cpp() {
local var="$1" val="$2"
@ -3190,6 +3190,7 @@ shvar_to_cpp() {
-e 's/\${rubylibdir}/"RUBY_LIB"/g' \
-e 's/\${rubylibprefix}/"RUBY_LIB_PREFIX"/g' \
-e 's/\${rubyarchprefix}/"RUBY_ARCH_PREFIX_FOR(arch)"/g' \
-e 's/\${rubysitearchprefix}/"RUBY_SITEARCH_PREFIX_FOR(arch)"/g' \
-e 's/\${exec_prefix}/"RUBY_EXEC_PREFIX"/g' \
-e 's|^\"NONE/|RUBY_EXEC_PREFIX\"/|' \
-e 's|^\"NONE\"|\"'"${prefix}"'\"|' \
@ -3216,6 +3217,13 @@ AC_ARG_WITH(rubyarchprefix,
[rubyarchprefix="$withval"])
AC_SUBST(rubyarchprefix)
rubysitearchprefix=${multiarch+'${sitearchlibdir}/${RUBY_BASE_NAME}'}${multiarch-'${rubylibprefix}/${sitearch}'}
AC_ARG_WITH(rubysitearchprefix,
AS_HELP_STRING([--with-rubysitearchprefix=DIR],
[prefix for architecture dependent site libraries [[RUBYLIBPREFIX/SITEARCH]]]),
[rubysitearchprefix="$withval"])
AC_SUBST(rubysitearchprefix)
RI_BASE_NAME=`echo ${RUBY_BASE_NAME} | sed 's/ruby/ri/'`
ridir='${datarootdir}/${RI_BASE_NAME}'
AC_ARG_WITH(ridir,
@ -3261,7 +3269,7 @@ AC_ARG_WITH(sitearchdir,
AS_HELP_STRING([--with-sitearchdir=DIR],
[architecture dependent site libraries in DIR [[SITEDIR/SITEARCH]], "no" to disable site directory]),
[sitearchdir=$withval],
[sitearchdir=${multiarch+'${rubyarchprefix}/site_ruby/${ruby_version}'}${multiarch-'${sitelibdir}/${sitearch}'}])
[sitearchdir=${multiarch+'${rubysitearchprefix}/site_ruby/${ruby_version}'}${multiarch-'${sitelibdir}/${sitearch}'}])
AC_ARG_WITH(vendordir,
AS_HELP_STRING([--with-vendordir=DIR], [vendor libraries in DIR [[RUBY_LIB_PREFIX/vendor_ruby]], "no" to disable vendor directory]),
@ -3273,7 +3281,7 @@ AC_ARG_WITH(vendorarchdir,
AS_HELP_STRING([--with-vendorarchdir=DIR],
[architecture dependent vendor libraries in DIR [[VENDORDIR/SITEARCH]], "no" to disable vendor directory]),
[vendorarchdir=$withval],
[vendorarchdir=${multiarch+'${rubyarchprefix}/vendor_ruby/${ruby_version}'}${multiarch-'${vendorlibdir}/${sitearch}'}])
[vendorarchdir=${multiarch+'${rubysitearchprefix}/vendor_ruby/${ruby_version}'}${multiarch-'${vendorlibdir}/${sitearch}'}])
if test "${LOAD_RELATIVE+set}"; then
AC_DEFINE_UNQUOTED(LOAD_RELATIVE, $LOAD_RELATIVE)
@ -3283,6 +3291,7 @@ else
fi
shvar_to_cpp RUBY_LIB_PREFIX "${rubylibprefix}"
shvar_to_cpp RUBY_ARCH_PREFIX_FOR "${rubyarchprefix}"
shvar_to_cpp RUBY_SITEARCH_PREFIX_FOR "${rubysitearchprefix}"
shvar_to_cpp RIDIR "${ridir}"
if test ${RUBY_LIB_VERSION_STYLE+set}; then
@ -3293,6 +3302,7 @@ fi
AC_DEFINE_UNQUOTED(RUBY_EXEC_PREFIX, ${RUBY_EXEC_PREFIX})
AC_DEFINE_UNQUOTED(RUBY_LIB_PREFIX, ${RUBY_LIB_PREFIX} !<verconf>!)
AC_DEFINE_UNQUOTED(RUBY_ARCH_PREFIX_FOR(arch), ${RUBY_ARCH_PREFIX_FOR} !<verconf>!)
AC_DEFINE_UNQUOTED(RUBY_SITEARCH_PREFIX_FOR(arch), ${RUBY_SITEARCH_PREFIX_FOR} !<verconf>!)
shvar_to_cpp RUBY_LIB "${rubylibdir}"
if test "x${RUBY_LIB}" != 'xRUBY_LIB_PREFIX"/"RUBY_LIB_VERSION'; then

View file

@ -31,6 +31,7 @@ sitearchincludedir=@sitearchincludedir@
ruby=${bindir}/${RUBY_INSTALL_NAME}@EXEEXT@
rubylibprefix=@rubylibprefix@
rubyarchprefix=@rubyarchprefix@
rubysitearchprefix=@rubysitearchprefix@
rubylibdir=@rubylibdir@
vendordir=@vendordir@
sitedir=@sitedir@

View file

@ -27,7 +27,7 @@ class TestRbConfig < Test::Unit::TestCase
bug7823 = '[ruby-dev:46964] [Bug #7823]'
RbConfig::MAKEFILE_CONFIG.each do |key, val|
next unless /\Asite.*arch.*dir\z/ =~ key
assert_match(/\$\(sitearch|\$\(rubyarchprefix\)/, val, "#{key} #{bug7823}")
assert_match(/\$\(sitearch|\$\(rubysitearchprefix\)/, val, "#{key} #{bug7823}")
end
end
@ -35,7 +35,7 @@ class TestRbConfig < Test::Unit::TestCase
bug7823 = '[ruby-dev:46964] [Bug #7823]'
RbConfig::MAKEFILE_CONFIG.each do |key, val|
next unless /\Avendor.*arch.*dir\z/ =~ key
assert_match(/\$\(sitearch|\$\(rubyarchprefix\)/, val, "#{key} #{bug7823}")
assert_match(/\$\(sitearch|\$\(rubysitearchprefix\)/, val, "#{key} #{bug7823}")
end
end
end