mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
configure.in: architecture name
* configure.in, version.c: parametric architecture name for paths. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@39105 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
a8795e3527
commit
85aae4c658
3 changed files with 28 additions and 19 deletions
|
@ -1,4 +1,6 @@
|
|||
Wed Feb 6 17:32:36 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
Wed Feb 6 17:32:41 2013 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* configure.in, version.c: parametric architecture name for paths.
|
||||
|
||||
* configure.in (shvar_to_cpp): convert sh variable references
|
||||
by replacing with string literal forms in cpp.
|
||||
|
|
10
configure.in
10
configure.in
|
@ -3143,8 +3143,8 @@ shvar_to_cpp() {
|
|||
-e 's/\${\([[A-Z][A-Z_]]*\)}/"\1"/g' \
|
||||
-e 's|\${libdir}|'"${libdir}|g" \
|
||||
-e 's/\${ruby_version}/"RUBY_LIB_VERSION"/g' \
|
||||
-e 's/\${arch}/"RUBY_ARCH"/g' \
|
||||
-e 's/\${sitearch}/"RUBY_SITEARCH"/g' \
|
||||
-e 's/\${arch}/"arch"/g' \
|
||||
-e 's/\${sitearch}/"arch"/g' \
|
||||
-e 's/\${vendorarchdir}/"RUBY_VENDOR_ARCH_LIB"/g' \
|
||||
-e 's/\${sitearchdir}/"RUBY_SITE_ARCH_LIB"/g' \
|
||||
-e 's/\${vendorlibdir}/"RUBY_VENDOR_LIB2"/g' \
|
||||
|
@ -3240,17 +3240,23 @@ shvar_to_cpp RUBY_LIB "${rubylibdir}"
|
|||
if test "x${RUBY_LIB}" != 'xRUBY_LIB_PREFIX"/"RUBY_LIB_VERSION'; then
|
||||
AC_DEFINE_UNQUOTED(RUBY_LIB, ${RUBY_LIB} !<verconf>!)
|
||||
fi
|
||||
shvar_to_cpp RUBY_ARCH_LIB_FOR "${rubyarchdir}"
|
||||
AC_DEFINE_UNQUOTED(RUBY_ARCH_LIB_FOR(arch), ${RUBY_ARCH_LIB_FOR} !<verconf>!)
|
||||
if test "x$sitedir" = xno; then
|
||||
AC_DEFINE(NO_RUBY_SITE_LIB, [] !<verconf>!)
|
||||
else
|
||||
shvar_to_cpp RUBY_SITE_LIB "${sitedir}"
|
||||
AC_DEFINE_UNQUOTED(RUBY_SITE_LIB, ${RUBY_SITE_LIB} !<verconf>!)
|
||||
shvar_to_cpp RUBY_SITE_ARCH_LIB_FOR "${sitearchdir}"
|
||||
AC_DEFINE_UNQUOTED(RUBY_SITE_ARCH_LIB_FOR(arch), ${RUBY_SITE_ARCH_LIB_FOR} !<verconf>!)
|
||||
fi
|
||||
if test "x$vendordir" = xno; then
|
||||
AC_DEFINE(NO_RUBY_VENDOR_LIB, [] !<verconf>!)
|
||||
else
|
||||
shvar_to_cpp RUBY_VENDOR_LIB "${vendordir}"
|
||||
AC_DEFINE_UNQUOTED(RUBY_VENDOR_LIB, ${RUBY_VENDOR_LIB} !<verconf>!)
|
||||
shvar_to_cpp RUBY_VENDOR_ARCH_LIB_FOR "${vendorarchdir}"
|
||||
AC_DEFINE_UNQUOTED(RUBY_VENDOR_ARCH_LIB_FOR(arch), ${RUBY_VENDOR_ARCH_LIB_FOR} !<verconf>!)
|
||||
fi
|
||||
|
||||
AC_SUBST(arch)dnl
|
||||
|
|
33
version.c
33
version.c
|
@ -42,13 +42,14 @@
|
|||
#define RUBY_LIB RUBY_LIB_PREFIX "/"RUBY_LIB_VERSION
|
||||
#define RUBY_SITE_LIB2 RUBY_SITE_LIB "/"RUBY_LIB_VERSION
|
||||
#define RUBY_VENDOR_LIB2 RUBY_VENDOR_LIB "/"RUBY_LIB_VERSION
|
||||
#define RUBY_ARCHLIB RUBY_LIB "/"RUBY_ARCH
|
||||
#define RUBY_SITE_ARCHLIB RUBY_SITE_LIB2 "/"RUBY_SITEARCH
|
||||
#define RUBY_VENDOR_ARCHLIB RUBY_VENDOR_LIB2 "/"RUBY_SITEARCH
|
||||
#ifdef RUBY_THINARCH
|
||||
#define RUBY_THIN_ARCHLIB RUBY_LIB "/"RUBY_THINARCH
|
||||
#define RUBY_SITE_THIN_ARCHLIB RUBY_SITE_LIB2 "/"RUBY_THINARCH
|
||||
#define RUBY_VENDOR_THIN_ARCHLIB RUBY_VENDOR_LIB2 "/"RUBY_THINARCH
|
||||
#ifndef RUBY_ARCH_LIB_FOR
|
||||
#define RUBY_ARCH_LIB_FOR(arch) RUBY_LIB "/"arch
|
||||
#endif
|
||||
#ifndef RUBY_SITE_ARCH_LIB_FOR
|
||||
#define RUBY_SITE_ARCH_LIB_FOR(arch) RUBY_SITE_LIB2 "/"arch
|
||||
#endif
|
||||
#ifndef RUBY_VENDOR_ARCH_LIB_FOR
|
||||
#define RUBY_VENDOR_ARCH_LIB_FOR(arch) RUBY_VENDOR_LIB2 "/"arch
|
||||
#endif
|
||||
|
||||
const int ruby_api_version[] = {
|
||||
|
@ -72,27 +73,27 @@ const char ruby_initial_load_paths[] =
|
|||
#endif
|
||||
#ifndef NO_RUBY_SITE_LIB
|
||||
RUBY_SITE_LIB2 "\0"
|
||||
#ifdef RUBY_SITE_THIN_ARCHLIB
|
||||
RUBY_SITE_THIN_ARCHLIB "\0"
|
||||
#ifdef RUBY_THINARCH
|
||||
RUBY_SITE_ARCH_LIB_FOR(RUBY_THINARCH) "\0"
|
||||
#endif
|
||||
RUBY_SITE_ARCHLIB "\0"
|
||||
RUBY_SITE_ARCH_LIB_FOR(RUBY_SITEARCH) "\0"
|
||||
RUBY_SITE_LIB "\0"
|
||||
#endif
|
||||
|
||||
#ifndef NO_RUBY_VENDOR_LIB
|
||||
RUBY_VENDOR_LIB2 "\0"
|
||||
#ifdef RUBY_VENDOR_THIN_ARCHLIB
|
||||
RUBY_VENDOR_THIN_ARCHLIB "\0"
|
||||
#ifdef RUBY_THINARCH
|
||||
RUBY_VENDOR_ARCH_LIB_FOR(RUBY_THINARCH) "\0"
|
||||
#endif
|
||||
RUBY_VENDOR_ARCHLIB "\0"
|
||||
RUBY_VENDOR_ARCH_LIB_FOR(RUBY_SITEARCH) "\0"
|
||||
RUBY_VENDOR_LIB "\0"
|
||||
#endif
|
||||
|
||||
RUBY_LIB "\0"
|
||||
#ifdef RUBY_THIN_ARCHLIB
|
||||
RUBY_THIN_ARCHLIB "\0"
|
||||
#ifdef RUBY_THINARCH
|
||||
RUBY_ARCH_LIB_FOR(RUBY_THINARCH) "\0"
|
||||
#endif
|
||||
RUBY_ARCHLIB "\0"
|
||||
RUBY_ARCH_LIB_FOR(RUBY_ARCH) "\0"
|
||||
#endif
|
||||
"";
|
||||
|
||||
|
|
Loading…
Reference in a new issue