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

ruby-changes:70054

From: Nobuyoshi <ko1@a...>
Date: Sat, 4 Dec 2021 10:40:27 +0900 (JST)
Subject: [ruby-changes:70054] a4964174e2 (master): Fix circular dependencies specific to in-place build [Bug #18374]

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

From a4964174e26303524cee8c2d8523048b87137993 Mon Sep 17 00:00:00 2001
From: Nobuyoshi Nakada <nobu@r...>
Date: Sat, 4 Dec 2021 10:40:15 +0900
Subject: Fix circular dependencies specific to in-place build [Bug #18374]

* Move the rubyspec running recipe after the rule for rubyspec
  C-API extension library, so that separate dummy recipe is not
  needed.

* Add a dummy recipe for rubyspec.h before the rubyspec running
  recipe, so that the dependency of extensions do not fire the
  latter.
---
 defs/gmake.mk | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/defs/gmake.mk b/defs/gmake.mk
index 1a6c8620ed9..0b17bfb16f0 100644
--- a/defs/gmake.mk
+++ b/defs/gmake.mk
@@ -367,11 +367,10 @@ spec/bundler: test-bundler-parallel https://github.com/ruby/ruby/blob/trunk/defs/gmake.mk#L367
 	$(Q)$(NULLCMD)
 
 # workaround to avoid matching non ruby files with "spec/%/" under GNU make 3.81
-spec/%_spec.c spec/%_spec.$(DLEXT):
+spec/%_spec.c:
+	$(empty)
+$(srcdir)/$(RUBYSPEC_CAPIEXT)/rubyspec.h:
 	$(empty)
-
-spec/%/ spec/%_spec.rb: programs exts PHONY
-	+$(RUNRUBY) -r./$(arch)-fake $(srcdir)/spec/mspec/bin/mspec-run -B $(srcdir)/spec/default.mspec $(SPECOPTS) $(patsubst %,$(srcdir)/%,$@)
 
 benchmark/%: miniruby$(EXEEXT) update-benchmark-driver PHONY
 	$(Q)$(BASERUBY) -rrubygems -I$(srcdir)/benchmark/lib $(srcdir)/benchmark/benchmark-driver/exe/benchmark-driver \
@@ -422,3 +421,6 @@ rubyspec-capiext: $(patsubst %.c,$(RUBYSPEC_CAPIEXT)/%.$(DLEXT),$(notdir $(wildc https://github.com/ruby/ruby/blob/trunk/defs/gmake.mk#L421
 ifeq ($(ENABLE_SHARED),yes)
 exts: rubyspec-capiext
 endif
+
+spec/%/ spec/%_spec.rb: programs exts PHONY
+	+$(RUNRUBY) -r./$(arch)-fake $(srcdir)/spec/mspec/bin/mspec-run -B $(srcdir)/spec/default.mspec $(SPECOPTS) $(patsubst %,$(srcdir)/%,$@)
-- 
cgit v1.2.1


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

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