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

ruby-changes:71634

From: Nobuyoshi <ko1@a...>
Date: Tue, 5 Apr 2022 22:35:54 +0900 (JST)
Subject: [ruby-changes:71634] 97ce030954 (master): Load fake.rb at `BTESTRUBY`

https://git.ruby-lang.org/ruby.git/commit/?id=97ce030954

From 97ce030954dab3f219779e235bee53ba408fbaca Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Fri, 1 Apr 2022 20:15:00 +0900
Subject: Load fake.rb at `BTESTRUBY`

So that `mkmf` checks work from `make run`, and also remove
duplicate `$(MINIRUBYOPT)` which is used in `$(MINIRUBY)`.
---
 common.mk            | 8 ++++----
 template/Makefile.in | 3 +--
 template/fake.rb.in  | 2 ++
 win32/Makefile.sub   | 2 +-
 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 https://github.com/ruby/ruby/blob/trunk/common.mk#L765
 
 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 https://github.com/ruby/ruby/blob/trunk/common.mk#L777
 	$(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 https://github.com/ruby/ruby/blob/trunk/common.mk#L1243
 
 ##
 
-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 https://github.com/ruby/ruby/blob/trunk/common.mk#L1252
 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) https://github.com/ruby/ruby/blob/trunk/template/Makefile.in#L147
 # 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 @@ https://github.com/ruby/ruby/blob/trunk/template/fake.rb.in#L1
+# 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) https://github.com/ruby/ruby/blob/trunk/win32/Makefile.sub#L385
 BOOTSTRAPRUBY = $(MINIRUBY)
 XRUBY = $(RUNRUBY)
 !endif
-BTESTRUBY = $(MINIRUBY)
+BTESTRUBY = $(MINIRUBY) -r./$(arch)-fake
 !ifndef RUBY
 RUBY = ruby
 !endif
-- 
cgit v1.2.1


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

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