From ef8139db13537ab2e4ef7d141076cfedb3cf8282 Mon Sep 17 00:00:00 2001 From: nobu Date: Wed, 5 Nov 2014 05:11:33 +0000 Subject: [PATCH] common.mk: update unicode data only if BASERUBY is available * common.mk (lib/unicode_normalize/tables.rb): do nothing unless BASERUBY is available. MINIRUBY cannot load extension libraries, so cannot update Unicode data. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@48278 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- ChangeLog | 6 ++++++ Makefile.in | 1 + common.mk | 2 +- configure.in | 3 +++ win32/setup.mak | 7 +++++++ 5 files changed, 18 insertions(+), 1 deletion(-) diff --git a/ChangeLog b/ChangeLog index 51d092d67e..e5ba75c65d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +Wed Nov 5 14:11:30 2014 Nobuyoshi Nakada + + * common.mk (lib/unicode_normalize/tables.rb): do nothing unless + BASERUBY is available. MINIRUBY cannot load extension libraries, + so cannot update Unicode data. + Wed Nov 5 12:13:54 2014 Nobuyoshi Nakada * string.c (rb_str_lstrip, rb_str_strip): reduce memory copy by diff --git a/Makefile.in b/Makefile.in index 39fe0bb37f..0b96347e3d 100644 --- a/Makefile.in +++ b/Makefile.in @@ -25,6 +25,7 @@ AUTOCONF = autoconf @SET_MAKE@ MKFILES = @MAKEFILES@ BASERUBY = @BASERUBY@ +HAVE_BASERUBY = @HAVE_BASERUBY@ TEST_RUNNABLE = @TEST_RUNNABLE@ CROSS_COMPILING = @CROSS_COMPILING@ DOXYGEN = @DOXYGEN@ diff --git a/common.mk b/common.mk index 75c6a7a646..29a01b63bb 100644 --- a/common.mk +++ b/common.mk @@ -1124,7 +1124,7 @@ download-unicode-data: ./.unicode-$(UNICODE_VERSION).time $(UNICODE_VERSION)/ucd/NormalizationTest.txt @exit > $@ -$(srcdir)/lib/unicode_normalize/tables.rb: ./.unicode-tables.time +$(srcdir)/$(HAVE_BASERUBY:yes=lib/unicode_normalize/tables.rb): ./.unicode-tables.time ./.unicode-tables.time: $(srcdir)/tool/generic_erb.rb \ $(UNICODE_FILES) $(UNICODE_FILES_DEPS) \ diff --git a/configure.in b/configure.in index c6504ba112..6ac18b8d10 100644 --- a/configure.in +++ b/configure.in @@ -46,10 +46,13 @@ if test "`RUBYOPT=- $BASERUBY -e 'p 42' 2>/dev/null`" = 42; then BASERUBY="$BASERUBY --disable=gems" fi $BASERUBY -C "$srcdir/tool" downloader.rb -e gnu config.guess config.sub + HAVE_BASERUBY=yes else BASERUBY="echo executable host ruby is required. use --with-baseruby option.; false" + HAVE_BASERUBY=no fi AC_SUBST(BASERUBY) +AC_SUBST(HAVE_BASERUBY) AC_DEFUN([RUBY_MINGW32], [AS_CASE(["$host_os"], diff --git a/win32/setup.mak b/win32/setup.mak index f64d24d331..f00418e864 100644 --- a/win32/setup.mak +++ b/win32/setup.mak @@ -66,7 +66,14 @@ USE_RUBYGEMS = $(USE_RUBYGEMS) @for %I in (ruby.exe) do @echo BASERUBY = %~s$$PATH:I>> $(MAKEFILE) @echo !if "$$(BASERUBY)" == "">> $(MAKEFILE) @echo BASERUBY = echo executable host ruby is required. use --with-baseruby option.^& exit 1 >> $(MAKEFILE) + @echo HAVE_BASERUBY = no>> $(MAKEFILE) + @echo !else>> $(MAKEFILE) + @echo HAVE_BASERUBY = yes>> $(MAKEFILE) @echo !endif>> $(MAKEFILE) +!elseif [$(BASERUBY) -eexit 2> nul] == 0 + @echo HAVE_BASERUBY = yes>> $(MAKEFILE) +!else + @echo HAVE_BASERUBY = no>> $(MAKEFILE) !endif -system-vars-: -osname- -runtime- -headers-