summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authornobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-03-02 04:54:18 +0000
committernobu <nobu@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2017-03-02 04:54:18 +0000
commit6e0967ec6de2be595bd8de8725bfbe334fd1ed82 (patch)
tree436a8a2d15c5f641a6c1f0697e6d16eb9cae730d
parent745f4dd5b834a00f1cc201adb72ea3c8c8d4decb (diff)
fix for cross-compiling
* common.mk (test-rubyspec): add dependency for cross-compiling. * defs/gmake.mk: ditto. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@57756 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
-rw-r--r--common.mk6
-rw-r--r--defs/gmake.mk13
2 files changed, 8 insertions, 11 deletions
diff --git a/common.mk b/common.mk
index 9b0caae..f42bd4b 100644
--- a/common.mk
+++ b/common.mk
@@ -706,8 +706,10 @@ $(RBCONFIG): $(srcdir)/tool/mkconfig.rb config.status $(srcdir)/version.h
test-rubyspec-precheck: $(arch)-fake.rb
-test-rubyspec: test-rubyspec-precheck
+test-rubyspec: $(TEST_RUNNABLE)-test-rubyspec
+yes-test-rubyspec: test-rubyspec-precheck
$(RUNRUBY) -r./$(arch)-fake $(srcdir)/spec/mspec/bin/mspec run -B $(srcdir)/spec/default.mspec $(MSPECOPT)
+no-test-rubyspec: test-rubyspec-precheck
RUNNABLE = $(LIBRUBY_RELATIVE:no=un)-runnable
runnable: $(RUNNABLE) prog $(srcdir)/tool/mkrunnable.rb PHONY
@@ -1223,7 +1225,7 @@ exam: check test-rubyspec
love: sudo-precheck up all test install check
@echo love is all you need
-yes-test-all: sudo-precheck
+yes-test-all no-test-all: sudo-precheck
sudo-precheck: PHONY
@$(SUDO) echo > $(NULL)
diff --git a/defs/gmake.mk b/defs/gmake.mk
index 8094891..d9eb285 100644
--- a/defs/gmake.mk
+++ b/defs/gmake.mk
@@ -3,9 +3,9 @@ gnumake = yes
override gnumake_recursive := $(if $(findstring n,$(firstword $(MFLAGS))),,+)
override mflags := $(filter-out -j%,$(MFLAGS))
-CHECK_TARGETS := exam love check%
+CHECK_TARGETS := exam love check test check% test% btest%
# expand test targets, and those dependents
-TEST_TARGETS := $(filter exam check test check% test% btest%,$(MAKECMDGOALS))
+TEST_TARGETS := $(filter $(CHECK_TARGETS),$(MAKECMDGOALS))
TEST_DEPENDS := $(filter-out $(TEST_TARGETS),$(MAKECMDGOALS))
TEST_TARGETS := $(patsubst exam,check test-rubyspec,$(TEST_TARGETS))
TEST_DEPENDS := $(filter-out exam $(TEST_TARGETS),$(TEST_DEPENDS))
@@ -60,8 +60,8 @@ ORDERED_TEST_TARGETS := $(filter $(TEST_TARGETS), \
test-rubyspec \
)
prev_test := $(if $(filter test-rubyspec,$(ORDERED_TEST_TARGETS)),test-rubyspec-precheck)
-$(foreach test,$(addprefix yes-,$(ORDERED_TEST_TARGETS)), \
- $(eval $(value test): $(value prev_test)); \
+$(foreach test,$(ORDERED_TEST_TARGETS), \
+ $(eval yes-$(value test) no-$(value test): $(value prev_test)); \
$(eval prev_test := $(value test)))
ifneq ($(if $(filter install,$(MAKECMDGOALS)),$(filter uninstall,$(MAKECMDGOALS))),)
@@ -74,11 +74,6 @@ install-prereq: uninstall
uninstall sudo-precheck: all $(if $(filter all,$(INSTALLDOC)),docs)
endif
-ifneq ($(filter exam,$(MAKECMDGOALS)),)
-test-rubyspec: check
-yes-test-all no-test-all: test
-endif
-
ifneq ($(filter love,$(MAKECMDGOALS)),)
showflags: up
sudo-precheck: test yes-test-testframework no-test-testframework