summaryrefslogtreecommitdiff
path: root/defs
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-06 03:11:46 (GMT)
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2018-10-06 03:11:46 (GMT)
commit96eff9ed71a7b5a233e06f6b011c198a2210788e (patch)
tree0602d7da2970c7a4dc53dfa5da1138f77583a261 /defs
parent0f5853c2c4fd35bbd42e503004195f8c18477c8d (diff)
order-only-prerequisites
* defs/gmake.mk: use order-only-prerequisites to run build and test targets sequentially. https://www.gnu.org/software/make/manual/html_node/Prerequisite-Types.html git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@64925 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'defs')
-rw-r--r--defs/gmake.mk35
1 files changed, 16 insertions, 19 deletions
diff --git a/defs/gmake.mk b/defs/gmake.mk
index 8af2106..e5409d8 100644
--- a/defs/gmake.mk
+++ b/defs/gmake.mk
@@ -4,25 +4,22 @@ override gnumake_recursive := $(if $(findstring n,$(firstword $(MFLAGS))),,+)
override mflags := $(filter-out -j%,$(MFLAGS))
MSPECOPT += $(if $(filter -j%,$(MFLAGS)),-j)
-CHECK_TARGETS := great exam love check test check% test% btest%
-# expand test targets, and those dependents
-TEST_TARGETS := $(filter $(CHECK_TARGETS),$(MAKECMDGOALS))
-TEST_DEPENDS := $(filter-out commit $(TEST_TARGETS),$(MAKECMDGOALS))
-TEST_TARGETS := $(patsubst great,exam,$(TEST_TARGETS))
-TEST_DEPENDS := $(filter-out great $(TEST_TARGETS),$(TEST_DEPENDS))
-TEST_TARGETS := $(patsubst exam,check,$(TEST_TARGETS))
-TEST_TARGETS := $(patsubst check,test-spec test-all,$(TEST_TARGETS))
-TEST_TARGETS := $(patsubst test-rubyspec,test-spec,$(TEST_TARGETS))
-TEST_DEPENDS := $(filter-out exam check test-spec $(TEST_TARGETS),$(TEST_DEPENDS))
-TEST_TARGETS := $(patsubst love,check,$(TEST_TARGETS))
-TEST_DEPENDS := $(filter-out love $(TEST_TARGETS),$(TEST_DEPENDS))
-TEST_TARGETS := $(patsubst test-all,test test-testframework test-almost,$(patsubst check-%,test test-%,$(TEST_TARGETS)))
-TEST_DEPENDS := $(filter-out test-all $(TEST_TARGETS),$(TEST_DEPENDS))
-TEST_TARGETS := $(patsubst test,test-short,$(TEST_TARGETS))
-TEST_DEPENDS := $(filter-out test $(TEST_TARGETS),$(TEST_DEPENDS))
-TEST_TARGETS := $(patsubst test-short,btest-ruby test-knownbug test-basic,$(TEST_TARGETS))
-TEST_DEPENDS := $(filter-out test-short $(TEST_TARGETS),$(TEST_DEPENDS))
-TEST_DEPENDS += $(if $(filter great exam love check,$(MAKECMDGOALS)),all exts)
+ifeq ($(firstword $(filter test-short main check,$(MAKECMDGOALS))),test-short)
+ext/configure-ext.mk: | test-short
+encdb.h $(ENC_MK): | test-short
+else
+yes-btest-ruby: | main
+endif
+yes-test-knownbug: | yes-btest-ruby
+yes-test-basic: | yes-test-knownbug
+yes-test-testframework: | test-short main
+yes-test-almost: | yes-test-testframework
+yes-test-spec: | yes-test-almost
+install-all install-nodoc: | yes-test-spec
+ifneq ($(filter reinstall,$(MAKECMDGOALS)),)
+install-all install-nodoc: | uninstall
+uninstall: | yes-test-spec
+endif
ifneq ($(filter -O0 -Od,$(optflags)),)
override XCFLAGS := $(filter-out -D_FORTIFY_SOURCE=%,$(XCFLAGS))