зеркало из https://github.com/github/ruby.git
* configure.in (rubygems): add --disable-rubygems option.
git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@30835 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
Родитель
c7f86bb5f6
Коммит
020dc4ba60
|
@ -1,3 +1,7 @@
|
|||
Fri Feb 11 12:03:24 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* configure.in (rubygems): add --disable-rubygems option.
|
||||
|
||||
Fri Feb 11 11:39:03 2011 Nobuyoshi Nakada <nobu@ruby-lang.org>
|
||||
|
||||
* template/fake.rb.in (CROSS_COMPILING): get rid of NameError.
|
||||
|
|
|
@ -89,6 +89,8 @@ XRUBY_LIBDIR = @XRUBY_LIBDIR@
|
|||
XRUBY_RUBYLIBDIR = @XRUBY_RUBYLIBDIR@
|
||||
XRUBY_RUBYHDRDIR = @XRUBY_RUBYHDRDIR@
|
||||
|
||||
DEFAULT_PRELUDES = $(@USE_RUBYGEMS@_GEM_PRELUDE)
|
||||
|
||||
#### End of system configuration section. ####
|
||||
|
||||
MAJOR= @MAJOR@
|
||||
|
|
|
@ -104,7 +104,10 @@ OBJS = $(EXPORTOBJS) prelude.$(OBJEXT)
|
|||
|
||||
GOLFOBJS = goruby.$(OBJEXT) golf_prelude.$(OBJEXT)
|
||||
|
||||
PRELUDE_SCRIPTS = $(srcdir)/prelude.rb $(srcdir)/enc/prelude.rb $(srcdir)/gem_prelude.rb
|
||||
PRELUDE_SCRIPTS = $(srcdir)/prelude.rb $(srcdir)/enc/prelude.rb $(DEFAULT_PRELUDES)
|
||||
GEM_PRELUDE = $(srcdir)/gem_prelude.rb
|
||||
YES_GEM_PRELUDE = $(GEM_PRELUDE)
|
||||
NO_GEM_PRELUDE =
|
||||
PRELUDES = prelude.c miniprelude.c
|
||||
GOLFPRELUDES = golf_prelude.c
|
||||
|
||||
|
|
11
configure.in
11
configure.in
|
@ -2836,6 +2836,17 @@ if test -z "$MANTYPE"; then
|
|||
fi
|
||||
AC_SUBST(MANTYPE)
|
||||
|
||||
AC_ARG_ENABLE(rubygems,
|
||||
AS_HELP_STRING([--disable-rubygems], [disable rubygems by default]),
|
||||
[enable_rubygems="$enableval"], [enable_rubygems=yes])
|
||||
if test x"$enable_rubygems" = xno; then
|
||||
AC_DEFINE(DISABLE_RUBYGEMS, 1)
|
||||
USE_RUBYGEMS=NO
|
||||
else
|
||||
USE_RUBYGEMS=YES
|
||||
fi
|
||||
AC_SUBST(USE_RUBYGEMS)
|
||||
|
||||
arch_hdrdir="${EXTOUT}/include/${arch}/ruby"
|
||||
AS_MKDIR_P("${arch_hdrdir}")
|
||||
config_h="${arch_hdrdir}/config.h"
|
||||
|
|
3
ruby.c
3
ruby.c
|
@ -111,6 +111,9 @@ cmdline_options_init(struct cmdline_options *opt)
|
|||
opt->src.enc.index = src_encoding_index;
|
||||
opt->ext.enc.index = -1;
|
||||
opt->intern.enc.index = -1;
|
||||
#if defined DISABLE_RUBYGEMS && DISABLE_RUBYGEMS
|
||||
opt->disable |= DISABLE_BIT(gems);
|
||||
#endif
|
||||
return opt;
|
||||
}
|
||||
|
||||
|
|
|
@ -197,6 +197,6 @@ else
|
|||
CONFIG['bindir'] = dir
|
||||
CONFIG['ruby_install_name'] = name
|
||||
CONFIG['RUBY_INSTALL_NAME'] = name
|
||||
Gem::ConfigMap[:bindir] = dir if defined?(Gem)
|
||||
Gem::ConfigMap[:bindir] = dir if defined?(Gem::ConfigMap)
|
||||
end
|
||||
end
|
||||
|
|
|
@ -276,6 +276,12 @@ XRUBY = $(RUNRUBY)
|
|||
!ifndef RUBY
|
||||
RUBY = ruby
|
||||
!endif
|
||||
!if "$(USE_RUBYGEMS)" == "NO"
|
||||
DEFAULT_PRELUDES = $(NO_GEM_PRELUDE)
|
||||
!else
|
||||
DEFAULT_PRELUDES = $(YES_GEM_PRELUDE)
|
||||
!endif
|
||||
|
||||
MAKEDIRS = $(MINIRUBY) -run -e mkdir -- -p
|
||||
|
||||
!if !defined(STACK)
|
||||
|
|
|
@ -26,6 +26,8 @@ if "%1" == "--enable-win95" goto :enable-win95
|
|||
if "%1" == "--disable-win95" goto :disable-win95
|
||||
if "%1" == "--enable-debug-env" goto :enable-debug-env
|
||||
if "%1" == "--disable-debug-env" goto :disable-debug-env
|
||||
if "%1" == "--enable-rubygems" goto :enable-rubygems
|
||||
if "%1" == "--disable-rubygems" goto :disable-rubygems
|
||||
if "%1" == "--extout" goto :extout
|
||||
if "%1" == "--path" goto :path
|
||||
if "%1" == "--with-baseruby" goto :baseruby
|
||||
|
@ -123,6 +125,16 @@ goto :loop
|
|||
echo>>confargs.tmp %1 \
|
||||
shift
|
||||
goto :loop
|
||||
:enable-rubygems
|
||||
echo>> ~tmp~.mak "USE_RUBYGEMS=YES" \
|
||||
echo>>confargs.tmp %1 \
|
||||
shift
|
||||
goto :loop
|
||||
:disable-rubygems
|
||||
echo>> ~tmp~.mak "USE_RUBYGEMS=NO" \
|
||||
echo>>confargs.tmp %1 \
|
||||
shift
|
||||
goto :loop
|
||||
:ntver
|
||||
echo>> ~tmp~.mak "NTVER=%~2" \
|
||||
echo>>confargs.tmp %1=%2 \
|
||||
|
|
Загрузка…
Ссылка в новой задаче