mirror of
https://github.com/ruby/ruby.git
synced 2022-11-09 12:17:21 -05:00
* configure.in: --with-vendordir implemented.
* mkconfig.rb: add config to vendorlibdir and vendorarchdir. * instruby.rb: make vendor library directories. * ruby.c: insert vendor library directories into load path. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@13806 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
79041dfc8d
commit
21eebfb086
5 changed files with 45 additions and 2 deletions
10
ChangeLog
10
ChangeLog
|
@ -1,3 +1,13 @@
|
||||||
|
Sat Nov 3 20:30:48 2007 Tanaka Akira <akr@fsij.org>
|
||||||
|
|
||||||
|
* configure.in: --with-vendordir implemented.
|
||||||
|
|
||||||
|
* mkconfig.rb: add config to vendorlibdir and vendorarchdir.
|
||||||
|
|
||||||
|
* instruby.rb: make vendor library directories.
|
||||||
|
|
||||||
|
* ruby.c: insert vendor library directories into load path.
|
||||||
|
|
||||||
Fri Nov 2 20:55:49 2007 Kouhei Sutou <kou@cozmixng.org>
|
Fri Nov 2 20:55:49 2007 Kouhei Sutou <kou@cozmixng.org>
|
||||||
|
|
||||||
* lib/rss/content.rb, lib/rss/content/, lib/rss/maker/content.rb,
|
* lib/rss/content.rb, lib/rss/content/, lib/rss/maker/content.rb,
|
||||||
|
|
22
configure.in
22
configure.in
|
@ -1589,9 +1589,28 @@ AC_DEFINE_UNQUOTED(RUBY_LIB, "${RUBY_LIB_PATH}")
|
||||||
AC_DEFINE_UNQUOTED(RUBY_SITE_LIB, "${RUBY_SITE_LIB_PATH}")
|
AC_DEFINE_UNQUOTED(RUBY_SITE_LIB, "${RUBY_SITE_LIB_PATH}")
|
||||||
AC_DEFINE_UNQUOTED(RUBY_SITE_LIB2, "${RUBY_SITE_LIB_PATH2}")
|
AC_DEFINE_UNQUOTED(RUBY_SITE_LIB2, "${RUBY_SITE_LIB_PATH2}")
|
||||||
|
|
||||||
|
AC_ARG_WITH(vendordir,
|
||||||
|
[ --with-vendordir=DIR vendor libraries in DIR [PREFIX/lib/ruby/vendor_ruby]],
|
||||||
|
[vendordir=$withval],
|
||||||
|
[vendordir='${prefix}/lib/ruby/vendor_ruby'])
|
||||||
|
VENDOR_DIR=`eval echo \\"${vendordir}\\"`
|
||||||
|
case "$target_os" in
|
||||||
|
cygwin*|mingw*|*djgpp*|os2-emx*)
|
||||||
|
RUBY_VENDOR_LIB_PATH="`expr "$VENDOR_DIR" : "$prefix\(/.*\)"`" ||
|
||||||
|
RUBY_VENDOR_LIB_PATH="$VENDOR_DIR";;
|
||||||
|
*)
|
||||||
|
RUBY_VENDOR_LIB_PATH="$VENDOR_DIR";;
|
||||||
|
esac
|
||||||
|
RUBY_VENDOR_LIB_PATH2="${RUBY_VENDOR_LIB_PATH}/${MAJOR}.${MINOR}"
|
||||||
|
|
||||||
|
AC_DEFINE_UNQUOTED(RUBY_LIB, "${RUBY_LIB_PATH}")
|
||||||
|
AC_DEFINE_UNQUOTED(RUBY_VENDOR_LIB, "${RUBY_VENDOR_LIB_PATH}")
|
||||||
|
AC_DEFINE_UNQUOTED(RUBY_VENDOR_LIB2, "${RUBY_VENDOR_LIB_PATH2}")
|
||||||
|
|
||||||
AC_SUBST(arch)dnl
|
AC_SUBST(arch)dnl
|
||||||
AC_SUBST(sitearch)dnl
|
AC_SUBST(sitearch)dnl
|
||||||
AC_SUBST(sitedir)dnl
|
AC_SUBST(sitedir)dnl
|
||||||
|
AC_SUBST(vendordir)dnl
|
||||||
|
|
||||||
configure_args=$ac_configure_args
|
configure_args=$ac_configure_args
|
||||||
AC_SUBST(configure_args)dnl
|
AC_SUBST(configure_args)dnl
|
||||||
|
@ -1604,6 +1623,8 @@ if test "$fat_binary" != no ; then
|
||||||
|
|
||||||
AC_DEFINE_UNQUOTED(RUBY_SITE_THIN_ARCHLIB,
|
AC_DEFINE_UNQUOTED(RUBY_SITE_THIN_ARCHLIB,
|
||||||
"${RUBY_SITE_LIB_PATH}/" __ARCHITECTURE__ "-${target_os}")
|
"${RUBY_SITE_LIB_PATH}/" __ARCHITECTURE__ "-${target_os}")
|
||||||
|
AC_DEFINE_UNQUOTED(RUBY_VENDOR_THIN_ARCHLIB,
|
||||||
|
"${RUBY_VENDOR_LIB_PATH}/" __ARCHITECTURE__ "-${target_os}")
|
||||||
AC_DEFINE_UNQUOTED(RUBY_PLATFORM, __ARCHITECTURE__ "-${target_os}")
|
AC_DEFINE_UNQUOTED(RUBY_PLATFORM, __ARCHITECTURE__ "-${target_os}")
|
||||||
else
|
else
|
||||||
arch="${target_cpu}-${target_os}"
|
arch="${target_cpu}-${target_os}"
|
||||||
|
@ -1617,6 +1638,7 @@ esac
|
||||||
|
|
||||||
AC_DEFINE_UNQUOTED(RUBY_ARCHLIB, "${RUBY_LIB_PATH}/${arch}")
|
AC_DEFINE_UNQUOTED(RUBY_ARCHLIB, "${RUBY_LIB_PATH}/${arch}")
|
||||||
AC_DEFINE_UNQUOTED(RUBY_SITE_ARCHLIB, "${RUBY_SITE_LIB_PATH2}/${sitearch}")
|
AC_DEFINE_UNQUOTED(RUBY_SITE_ARCHLIB, "${RUBY_SITE_LIB_PATH2}/${sitearch}")
|
||||||
|
AC_DEFINE_UNQUOTED(RUBY_VENDOR_ARCHLIB, "${RUBY_VENDOR_LIB_PATH2}/${sitearch}")
|
||||||
|
|
||||||
AC_ARG_WITH(search-path,
|
AC_ARG_WITH(search-path,
|
||||||
[ --with-search-path=DIR specify the additional search path],
|
[ --with-search-path=DIR specify the additional search path],
|
||||||
|
|
|
@ -175,6 +175,8 @@ rubylibdir = CONFIG["rubylibdir"]
|
||||||
archlibdir = CONFIG["archdir"]
|
archlibdir = CONFIG["archdir"]
|
||||||
sitelibdir = CONFIG["sitelibdir"]
|
sitelibdir = CONFIG["sitelibdir"]
|
||||||
sitearchlibdir = CONFIG["sitearchdir"]
|
sitearchlibdir = CONFIG["sitearchdir"]
|
||||||
|
vendorlibdir = CONFIG["vendorlibdir"]
|
||||||
|
vendorarchlibdir = CONFIG["vendorarchdir"]
|
||||||
mandir = File.join(CONFIG["mandir"], "man")
|
mandir = File.join(CONFIG["mandir"], "man")
|
||||||
configure_args = Shellwords.shellwords(CONFIG["configure_args"])
|
configure_args = Shellwords.shellwords(CONFIG["configure_args"])
|
||||||
enable_shared = CONFIG["ENABLE_SHARED"] == 'yes'
|
enable_shared = CONFIG["ENABLE_SHARED"] == 'yes'
|
||||||
|
@ -214,7 +216,7 @@ if $extout
|
||||||
extout = "#$extout"
|
extout = "#$extout"
|
||||||
install?(:ext, :arch, :'ext-arch') do
|
install?(:ext, :arch, :'ext-arch') do
|
||||||
puts "installing extension objects"
|
puts "installing extension objects"
|
||||||
makedirs [archlibdir, sitearchlibdir, archhdrdir]
|
makedirs [archlibdir, sitearchlibdir, vendorarchlibdir, archhdrdir]
|
||||||
if noinst = CONFIG["no_install_files"] and noinst.empty?
|
if noinst = CONFIG["no_install_files"] and noinst.empty?
|
||||||
noinst = nil
|
noinst = nil
|
||||||
end
|
end
|
||||||
|
@ -224,7 +226,7 @@ if $extout
|
||||||
install?(:ext, :comm, :'ext-comm') do
|
install?(:ext, :comm, :'ext-comm') do
|
||||||
puts "installing extension scripts"
|
puts "installing extension scripts"
|
||||||
hdrdir = rubyhdrdir + "/ruby"
|
hdrdir = rubyhdrdir + "/ruby"
|
||||||
makedirs [rubylibdir, sitelibdir, hdrdir]
|
makedirs [rubylibdir, sitelibdir, vendorlibdir, hdrdir]
|
||||||
install_recursive("#{extout}/common", rubylibdir)
|
install_recursive("#{extout}/common", rubylibdir)
|
||||||
install_recursive("#{extout}/include/ruby", hdrdir, :glob => "*.h")
|
install_recursive("#{extout}/include/ruby", hdrdir, :glob => "*.h")
|
||||||
end
|
end
|
||||||
|
|
|
@ -143,6 +143,8 @@ print <<EOS
|
||||||
CONFIG["archdir"] = "$(rubylibdir)/$(arch)"
|
CONFIG["archdir"] = "$(rubylibdir)/$(arch)"
|
||||||
CONFIG["sitelibdir"] = "$(sitedir)/$(ruby_version)"
|
CONFIG["sitelibdir"] = "$(sitedir)/$(ruby_version)"
|
||||||
CONFIG["sitearchdir"] = "$(sitelibdir)/$(sitearch)"
|
CONFIG["sitearchdir"] = "$(sitelibdir)/$(sitearch)"
|
||||||
|
CONFIG["vendorlibdir"] = "$(vendordir)/$(ruby_version)"
|
||||||
|
CONFIG["vendorarchdir"] = "$(vendorlibdir)/$(sitearch)"
|
||||||
CONFIG["topdir"] = File.dirname(__FILE__)
|
CONFIG["topdir"] = File.dirname(__FILE__)
|
||||||
MAKEFILE_CONFIG = {}
|
MAKEFILE_CONFIG = {}
|
||||||
CONFIG.each{|k,v| MAKEFILE_CONFIG[k] = v.dup}
|
CONFIG.each{|k,v| MAKEFILE_CONFIG[k] = v.dup}
|
||||||
|
|
7
ruby.c
7
ruby.c
|
@ -374,6 +374,13 @@ ruby_init_loadpath(void)
|
||||||
incpush(RUBY_RELATIVE(RUBY_SITE_ARCHLIB));
|
incpush(RUBY_RELATIVE(RUBY_SITE_ARCHLIB));
|
||||||
incpush(RUBY_RELATIVE(RUBY_SITE_LIB));
|
incpush(RUBY_RELATIVE(RUBY_SITE_LIB));
|
||||||
|
|
||||||
|
incpush(RUBY_RELATIVE(RUBY_VENDOR_LIB2));
|
||||||
|
#ifdef RUBY_VENDOR_THIN_ARCHLIB
|
||||||
|
incpush(RUBY_RELATIVE(RUBY_VENDOR_THIN_ARCHLIB));
|
||||||
|
#endif
|
||||||
|
incpush(RUBY_RELATIVE(RUBY_VENDOR_ARCHLIB));
|
||||||
|
incpush(RUBY_RELATIVE(RUBY_VENDOR_LIB));
|
||||||
|
|
||||||
incpush(RUBY_RELATIVE(RUBY_LIB));
|
incpush(RUBY_RELATIVE(RUBY_LIB));
|
||||||
#ifdef RUBY_THIN_ARCHLIB
|
#ifdef RUBY_THIN_ARCHLIB
|
||||||
incpush(RUBY_RELATIVE(RUBY_THIN_ARCHLIB));
|
incpush(RUBY_RELATIVE(RUBY_THIN_ARCHLIB));
|
||||||
|
|
Loading…
Reference in a new issue