make: introduce "termdeps" target

This commit is contained in:
Kaspar Schleiser 2019-06-28 13:12:20 +02:00
parent 326ec30074
commit 6d22f942f7

View File

@ -399,7 +399,7 @@ include $(RIOTMAKE)/bindist.inc.mk
include $(RIOTMAKE)/modules.inc.mk
.PHONY: all link clean flash flash-only term doc debug debug-server reset objdump help info-modules
.PHONY: all link clean flash flash-only termdeps term doc debug debug-server reset objdump help info-modules
.PHONY: print-size elffile binfile hexfile flashfile
.PHONY: ..in-docker-container
@ -559,6 +559,8 @@ flash-only: $(FLASHDEPS)
preflash: $(BUILD_BEFORE_FLASH)
$(PREFLASHER) $(PREFFLAGS)
termdeps: $(TERMDEPS)
term: $(filter flash, $(MAKECMDGOALS)) $(TERMDEPS)
$(call check_cmd,$(TERMPROG),Terminal program)
$(TERMPROG) $(TERMFLAGS)
@ -588,6 +590,16 @@ reset:
.PHONY: test test/available
TESTS ?= $(foreach file,$(wildcard $(APPDIR)/tests/*[^~]),\
$(shell test -f $(file) -a -x $(file) && echo $(file)))
# "make test" calls "make term" which would implicitly build it's dependencies,
# but that increases the time "make test" needs to get ready. That can cause
# problems ("make term" missing some lines) as terminal startup is not properly
# sychronized, but depends on a static timeout (TESTRUNNER_START_DELAY).
# Murdock builds the term dependencies before running "make test" to circumvent
# this. In order to make local builds behave similar, add the term deps here.
# See #11762.
TEST_DEPS += $(TERMDEPS)
test: $(TEST_DEPS)
$(Q) for t in $(TESTS); do \
$$t || exit 1; \