[前][次][番号順一覧][スレッド一覧]

ruby-changes:73468

From: Nobuyoshi <ko1@a...>
Date: Wed, 7 Sep 2022 14:37:16 +0900 (JST)
Subject: [ruby-changes:73468] 1f91dcdab3 (master): Define BOOTSTRAPRUBY from HAVE_BASERUBY

https://git.ruby-lang.org/ruby.git/commit/?id=1f91dcdab3

From 1f91dcdab3b530dde93fa29fba8bf60683cd8056 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Tue, 6 Sep 2022 15:15:47 +0900
Subject: Define BOOTSTRAPRUBY from HAVE_BASERUBY

---
 common.mk            | 1 +
 configure.ac         | 8 --------
 template/Makefile.in | 7 +++++--
 win32/Makefile.sub   | 6 ++++--
 4 files changed, 10 insertions(+), 12 deletions(-)

diff --git a/common.mk b/common.mk
index d574703739..8d9fc08629 100644
--- a/common.mk
+++ b/common.mk
@@ -195,6 +195,7 @@ INSTRUBY_ARGS =	$(SCRIPT_ARGS) \ https://github.com/ruby/ruby/blob/trunk/common.mk#L195
 INSTALL_PROG_MODE = 0755
 INSTALL_DATA_MODE = 0644
 
+BOOTSTRAPRUBY_COMMAND = $(BOOTSTRAPRUBY) $(BOOTSTRAPRUBY_OPT)
 TESTSDIR      = $(srcdir)/test
 TOOL_TESTSDIR = $(tooldir)/test
 TEST_EXCLUDES = --excludes-dir=$(TESTSDIR)/excludes --name=!/memory_leak/
diff --git a/configure.ac b/configure.ac
index f981d1aa70..e5454f117e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -3348,8 +3348,6 @@ for var in bindir includedir libdir rubylibprefix; do https://github.com/ruby/ruby/blob/trunk/configure.ac#L3348
 done
 
 BTESTRUBY='$(MINIRUBY)'
-BOOTSTRAPRUBY='$(BASERUBY)'
-BOOTSTRAPRUBY_COMMAND='$(BOOTSTRAPRUBY)'
 AS_IF([test x"$cross_compiling" = xyes], [
   test x"$MINIRUBY" = x && MINIRUBY="${RUBY-$BASERUBY} -I`$CHDIR .; pwd` "-r'$(arch)-fake'
   XRUBY_LIBDIR=`${RUBY-$BASERUBY} -rrbconfig -e ['puts RbConfig::CONFIG["libdir"]']`
@@ -3362,7 +3360,6 @@ AS_IF([test x"$cross_compiling" = xyes], [ https://github.com/ruby/ruby/blob/trunk/configure.ac#L3360
   RUNRUBY_COMMAND='$(MINIRUBY) -I`cd $(srcdir)/lib; pwd`'
   RUNRUBY='$(RUNRUBY_COMMAND)'
   XRUBY='$(MINIRUBY)'
-  BOOTSTRAPRUBY_COMMAND='$(BOOTSTRAPRUBY) -r./$(arch)-fake'
   TEST_RUNNABLE=no
   CROSS_COMPILING=yes
   AC_DEFINE(CROSS_COMPILING, 1)
@@ -3373,9 +3370,6 @@ AS_IF([test x"$cross_compiling" = xyes], [ https://github.com/ruby/ruby/blob/trunk/configure.ac#L3370
   RUNRUBY_COMMAND='$(MINIRUBY) $(tooldir)/runruby.rb --extout=$(EXTOUT) $(RUNRUBYOPT)'
   RUNRUBY='$(RUNRUBY_COMMAND) --'
   XRUBY='$(RUNRUBY)'
-  AS_CASE(["$HAVE_BASERUBY"],
-  [yes], [BOOTSTRAPRUBY_COMMAND='$(BOOTSTRAPRUBY) -r./$(arch)-fake'],
-  [BOOTSTRAPRUBY='$(MINIRUBY)'])
   TEST_RUNNABLE=yes
   CROSS_COMPILING=no
 ])
@@ -3387,8 +3381,6 @@ AC_SUBST(PREP) https://github.com/ruby/ruby/blob/trunk/configure.ac#L3381
 AC_SUBST(RUNRUBY_COMMAND)
 AC_SUBST(RUNRUBY)
 AC_SUBST(XRUBY)
-AC_SUBST(BOOTSTRAPRUBY)
-AC_SUBST(BOOTSTRAPRUBY_COMMAND)
 AC_SUBST(EXTOUT, [${EXTOUT=.ext}])
 
 FIRSTMAKEFILE=""
diff --git a/template/Makefile.in b/template/Makefile.in
index 1e2a09139e..bfd18936e0 100644
--- a/template/Makefile.in
+++ b/template/Makefile.in
@@ -165,8 +165,11 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@ https://github.com/ruby/ruby/blob/trunk/template/Makefile.in#L165
 XRUBY_LIBDIR = @XRUBY_LIBDIR@
 XRUBY_RUBYLIBDIR = @XRUBY_RUBYLIBDIR@
 XRUBY_RUBYHDRDIR = @XRUBY_RUBYHDRDIR@
-BOOTSTRAPRUBY = @BOOTSTRAPRUBY@
-BOOTSTRAPRUBY_COMMAND = @BOOTSTRAPRUBY_COMMAND@
+
+yes_baseruby = $(HAVE_BASERUBY:no=)
+no_baseruby = $(HAVE_BASERUBY:yes=)
+BOOTSTRAPRUBY = $(yes_baseruby:yes=$(BASERUBY)) $(no_baseruby:$(MINIRUBY))
+BOOTSTRAPRUBY_OPT = $(yes_baseruby:yes=-r./$(arch)-fake)
 
 COROUTINE_H = @X_COROUTINE_H@
 COROUTINE_OBJ = $(COROUTINE_H:.h=.$(OBJEXT))
diff --git a/win32/Makefile.sub b/win32/Makefile.sub
index b3d0a2f76e..e4b9a3cac8 100644
--- a/win32/Makefile.sub
+++ b/win32/Makefile.sub
@@ -363,13 +363,15 @@ RUNRUBY = .\$(PROGRAM) -I$(srcdir)/lib -I"$(EXTOUT)/$(arch)" -I. https://github.com/ruby/ruby/blob/trunk/win32/Makefile.sub#L363
 !endif
 MINIRUBY = $(MINIRUBY) $(MINIRUBYOPT)
 RUNRUBY = $(RUNRUBY) "$(tooldir)/runruby.rb" --extout="$(EXTOUT)" $(RUNRUBYOPT) -- $(RUN_OPTS)
+yes_baseruby = $(HAVE_BASERUBY:no=)
+no_baseruby = $(HAVE_BASERUBY:yes=)
 !if "$(CROSS_COMPILING)" == "yes"
 XRUBY = $(MINIRUBY)
 BOOTSTRAPRUBY = $(BASERUBY)
-BOOTSTRAPRUBY_COMMAND = $(BOOTSTRAPRUBY) -r./$(arch)-fake
+BOOTSTRAPRUBY_OPT = -r./$(arch)-fake
 !else
 BOOTSTRAPRUBY = $(MINIRUBY)
-BOOTSTRAPRUBY_COMMAND = $(BOOTSTRAPRUBY)
+BOOTSTRAPRUBY_OPT =
 XRUBY = $(RUNRUBY)
 !endif
 BTESTRUBY = $(MINIRUBY) -r./$(arch)-fake
-- 
cgit v1.2.1


--
ML: ruby-changes@q...
Info: http://www.atdot.net/~ko1/quickml/

[前][次][番号順一覧][スレッド一覧]