summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorNobuyoshi Nakada <nobu@ruby-lang.org>2022-04-01 20:15:00 +0900
committerNobuyoshi Nakada <nobu@ruby-lang.org>2022-04-05 22:35:40 +0900
commit97ce030954dab3f219779e235bee53ba408fbaca (patch)
treeef39c14350acc05da48ad2552729a92590dda060
parentd9c6f8d45c658121dcabb2e26cddb473e907d724 (diff)
Load fake.rb at `BTESTRUBY`
So that `mkmf` checks work from `make run`, and also remove duplicate `$(MINIRUBYOPT)` which is used in `$(MINIRUBY)`.
Notes
Notes: Merged: https://github.com/ruby/ruby/pull/5747
-rw-r--r--common.mk8
-rw-r--r--template/Makefile.in3
-rw-r--r--template/fake.rb.in2
-rw-r--r--win32/Makefile.sub2
4 files changed, 8 insertions, 7 deletions
diff --git a/common.mk b/common.mk
index 9068a298a6..7c552cba1e 100644
--- a/common.mk
+++ b/common.mk
@@ -765,7 +765,7 @@ $(arch)-fake.rb: $(srcdir)/template/fake.rb.in $(tooldir)/generic_erb.rb version
btest: $(TEST_RUNNABLE)-btest
no-btest: PHONY
-yes-btest: fake miniruby$(EXEEXT) PHONY
+yes-btest: yes-fake miniruby$(EXEEXT) PHONY
$(ACTIONS_GROUP)
$(Q)$(exec) $(BOOTSTRAPRUBY) "$(srcdir)/bootstraptest/runner.rb" --ruby="$(BTESTRUBY) $(RUN_OPTS)" $(OPTS) $(TESTOPTS) $(BTESTS)
$(ACTIONS_ENDGROUP)
@@ -777,7 +777,7 @@ yes-btest-ruby: prog PHONY
$(Q)$(exec) $(RUNRUBY) "$(srcdir)/bootstraptest/runner.rb" --ruby="$(PROGRAM) -I$(srcdir)/lib $(RUN_OPTS)" -q $(OPTS) $(TESTOPTS) $(BTESTS)
$(ACTIONS_ENDGROUP)
-rtest: fake miniruby$(EXEEXT) PHONY
+rtest: yes-fake miniruby$(EXEEXT) PHONY
$(ACTIONS_GROUP)
$(Q)$(exec) $(BOOTSTRAPRUBY) "$(srcdir)/bootstraptest/runner.rb" --ruby="$(BTESTRUBY) $(RUN_OPTS)" --sets=ractor -v
$(ACTIONS_ENDGROUP)
@@ -1243,7 +1243,7 @@ $(srcdir)/ext/etc/constdefs.h: $(srcdir)/ext/etc/depend
##
-run: fake miniruby$(EXEEXT) PHONY
+run: yes-fake miniruby$(EXEEXT) PHONY
$(BTESTRUBY) $(RUNOPT0) $(TESTRUN_SCRIPT) $(RUNOPT)
runruby: $(PROGRAM) PHONY
@@ -1252,7 +1252,7 @@ runruby: $(PROGRAM) PHONY
runirb: $(PROGRAM) PHONY
RUBY_ON_BUG='gdb -x $(srcdir)/.gdbinit -p' $(RUNRUBY) $(RUNOPT0) -r irb -e 'IRB.start("make runirb")' $(RUNOPT)
-parse: fake miniruby$(EXEEXT) PHONY
+parse: yes-fake miniruby$(EXEEXT) PHONY
$(BTESTRUBY) --dump=parsetree_with_comment,insns $(TESTRUN_SCRIPT)
bisect: PHONY
diff --git a/template/Makefile.in b/template/Makefile.in
index 54b32d05b3..37cdaa7993 100644
--- a/template/Makefile.in
+++ b/template/Makefile.in
@@ -147,8 +147,7 @@ RUNRUBY = @RUNRUBY@ $(RUN_OPTS)
# RUNRUBY_DEBUGGER:: debugging option for runruby.rb
RUNRUBY_DEBUGGER = --debugger='gdb -x run.gdb --quiet --args'
XRUBY = @XRUBY@
-BTESTRUBY = @BTESTRUBY@\
- $(MINIRUBYOPT)
+BTESTRUBY = @BTESTRUBY@ -r./$(arch)-fake
INSTALL = @INSTALL@
INSTALL_DATA = @INSTALL_DATA@
INSTALL_SCRIPT = @INSTALL_SCRIPT@
diff --git a/template/fake.rb.in b/template/fake.rb.in
index 2280a4d8e7..7af17fa344 100644
--- a/template/fake.rb.in
+++ b/template/fake.rb.in
@@ -1,3 +1,5 @@
+# frozen_string_literal: true
+# shareable_constant_value: literal
<%
arg = {}
while /\A(\w+)=(.*)/ =~ ARGV[0]
diff --git a/win32/Makefile.sub b/win32/Makefile.sub
index 74d9118ab9..9dc5ee6f51 100644
--- a/win32/Makefile.sub
+++ b/win32/Makefile.sub
@@ -385,7 +385,7 @@ BOOTSTRAPRUBY = $(BASERUBY)
BOOTSTRAPRUBY = $(MINIRUBY)
XRUBY = $(RUNRUBY)
!endif
-BTESTRUBY = $(MINIRUBY)
+BTESTRUBY = $(MINIRUBY) -r./$(arch)-fake
!ifndef RUBY
RUBY = ruby
!endif