Skip to content

Commit

Permalink
Define BOOTSTRAPRUBY from HAVE_BASERUBY
Browse files Browse the repository at this point in the history
  • Loading branch information
nobu committed Sep 7, 2022
1 parent cac0dcf commit 1f91dcd
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 12 deletions.
1 change: 1 addition & 0 deletions common.mk
Original file line number Diff line number Diff line change
Expand Up @@ -195,6 +195,7 @@ INSTRUBY_ARGS = $(SCRIPT_ARGS) \
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/
Expand Down
8 changes: 0 additions & 8 deletions configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -3348,8 +3348,6 @@ for var in bindir includedir libdir rubylibprefix; do
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"]']`
Expand All @@ -3362,7 +3360,6 @@ AS_IF([test x"$cross_compiling" = xyes], [
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)
Expand All @@ -3373,9 +3370,6 @@ AS_IF([test x"$cross_compiling" = xyes], [
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
])
Expand All @@ -3387,8 +3381,6 @@ AC_SUBST(PREP)
AC_SUBST(RUNRUBY_COMMAND)
AC_SUBST(RUNRUBY)
AC_SUBST(XRUBY)
AC_SUBST(BOOTSTRAPRUBY)
AC_SUBST(BOOTSTRAPRUBY_COMMAND)
AC_SUBST(EXTOUT, [${EXTOUT=.ext}])

FIRSTMAKEFILE=""
Expand Down
7 changes: 5 additions & 2 deletions template/Makefile.in
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,11 @@ INSTALL_PROGRAM = @INSTALL_PROGRAM@
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))
Expand Down
6 changes: 4 additions & 2 deletions win32/Makefile.sub
Original file line number Diff line number Diff line change
Expand Up @@ -363,13 +363,15 @@ RUNRUBY = .\$(PROGRAM) -I$(srcdir)/lib -I"$(EXTOUT)/$(arch)" -I.
!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
Expand Down

0 comments on commit 1f91dcd

Please sign in to comment.