ruby-changes:74476
From: Nobuyoshi <ko1@a...>
Date: Sun, 13 Nov 2022 23:55:14 +0900 (JST)
Subject: [ruby-changes:74476] 2f7d2662dd (master): Control non-parallel parts with `.WAIT` if available
https://git.ruby-lang.org/ruby.git/commit/?id=2f7d2662dd From 2f7d2662dd90a6985f1c98ea93cfc2026407a8ab Mon Sep 17 00:00:00 2001 From: Nobuyoshi Nakada <nobu@r...> Date: Sun, 13 Nov 2022 23:54:43 +0900 Subject: Control non-parallel parts with `.WAIT` if available --- common.mk | 4 ++-- defs/gmake.mk | 4 ++++ template/GNUmakefile.in | 4 ++++ 3 files changed, 10 insertions(+), 2 deletions(-) diff --git a/common.mk b/common.mk index 99cda1a98a..a9a5d635d5 100644 --- a/common.mk +++ b/common.mk @@ -776,7 +776,7 @@ clean-spec: PHONY https://github.com/ruby/ruby/blob/trunk/common.mk#L776 -$(Q) $(RMDIRS) $(RUBYSPEC_CAPIEXT) 2> $(NULL) || $(NULLCMD) -$(Q) $(RMALL) rubyspec_temp -check: main test test-tool test-all test-spec +check: main $(DOT_WAIT) test $(DOT_WAIT) test-tool $(DOT_WAIT) test-all $(DOT_WAIT) test-spec $(ECHO) check succeeded -$(Q) : : "run only on sh"; \ if [ x"$(GIT)" != x ] && $(CHDIR) "$(srcdir)" && \ @@ -854,7 +854,7 @@ yes-test-tool: prog PHONY https://github.com/ruby/ruby/blob/trunk/common.mk#L854 no-test-tool: PHONY test-sample: test-basic # backward compatibility for mswin-build -test-short: btest-ruby test-knownbug test-basic +test-short: btest-ruby $(DOT_WAIT) test-knownbug $(DOT_WAIT) test-basic test: test-short # $ make test-all TESTOPTS="--help" displays more detail diff --git a/defs/gmake.mk b/defs/gmake.mk index ec93bfbeba..6064ae40d8 100644 --- a/defs/gmake.mk +++ b/defs/gmake.mk @@ -19,6 +19,7 @@ INSTRUBY_ENV += SDKROOT= https://github.com/ruby/ruby/blob/trunk/defs/gmake.mk#L19 endif INSTRUBY_ARGS += --gnumake +ifeq ($(DOT_WAIT),) CHECK_TARGETS := great exam love check test check% test% btest% # expand test targets, and those dependents TEST_TARGETS := $(filter $(CHECK_TARGETS),$(MAKECMDGOALS)) @@ -41,6 +42,7 @@ TEST_TARGETS := $(patsubst test-bundled-gems-run,test-bundled-gems-run $(PREPARE https://github.com/ruby/ruby/blob/trunk/defs/gmake.mk#L42 TEST_TARGETS := $(patsubst test-bundled-gems-prepare,test-bundled-gems-prepare $(PRECHECK_BUNDLED_GEMS) test-bundled-gems-fetch,$(TEST_TARGETS)) TEST_DEPENDS := $(filter-out test-short $(TEST_TARGETS),$(TEST_DEPENDS)) TEST_DEPENDS += $(if $(filter great exam love check,$(MAKECMDGOALS)),all exts) +endif in-srcdir := $(if $(filter-out .,$(srcdir)),$(CHDIR) $(srcdir) &&) @@ -71,6 +73,7 @@ $(foreach arch,$(arch_flags),\ https://github.com/ruby/ruby/blob/trunk/defs/gmake.mk#L73 $(eval $(call archcmd,$(patsubst -arch=%,%,$(value arch)),$(patsubst -arch=%,-arch %,$(value arch))))) endif +ifeq ($(DOT_WAIT),) .PHONY: $(addprefix yes-,$(TEST_TARGETS)) ifneq ($(filter-out btest%,$(TEST_TARGETS)),) @@ -88,6 +91,7 @@ prev_test := $(if $(filter test-spec,$(ORDERED_TEST_TARGETS)),test-spec-precheck https://github.com/ruby/ruby/blob/trunk/defs/gmake.mk#L91 $(foreach test,$(ORDERED_TEST_TARGETS), \ $(eval yes-$(value test) no-$(value test): $(value prev_test)); \ $(eval prev_test := $(value test))) +endif ifneq ($(if $(filter install,$(MAKECMDGOALS)),$(filter uninstall,$(MAKECMDGOALS))),) install-targets := $(filter install uninstall,$(MAKECMDGOALS)) diff --git a/template/GNUmakefile.in b/template/GNUmakefile.in index 4fe4aab979..0c8ac5f0e4 100644 --- a/template/GNUmakefile.in +++ b/template/GNUmakefile.in @@ -12,6 +12,10 @@ ifeq ($(HAVE_BASERUBY),yes) https://github.com/ruby/ruby/blob/trunk/template/GNUmakefile.in#L12 override REVISION_FORCE := PHONY endif +ifneq ($(filter notintermediate,$(.FEATURES)),) +DOT_WAIT = .WAIT +endif + include $(srcdir)/defs/universal.mk -include uncommon.mk include $(srcdir)/defs/gmake.mk -- cgit v1.2.3 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/