From 493528a556409d4dac2e40262dcb04a6465a1655 Mon Sep 17 00:00:00 2001 From: Jesse Vincent Date: Mon, 28 Mar 2022 00:19:30 -0700 Subject: [PATCH] If you're using gmake 4.0 or newer, display simulator test output nicer --- Makefile | 5 +++++ tests/Makefile | 3 --- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/Makefile b/Makefile index 275290e5..c787210f 100644 --- a/Makefile +++ b/Makefile @@ -18,6 +18,11 @@ MAKEFLAGS += --no-builtin-rules .SUFFIXES: +# GNU Make earlier than 4.0 don't have the output-sync option, but we need it +# to make parallel simulator test output readable. (otherwise it gets interleaved) +ifeq ($(shell test $(firstword $(subst ., ,$(MAKE_VERSION))) -ge 4; echo $$?),0) +SUBDIR_MAKEFLAGS+=--output-sync=target +endif include $(dir $(abspath $(lastword $(MAKEFILE_LIST))))/etc/makefiles/arduino-cli.mk diff --git a/tests/Makefile b/tests/Makefile index 32ad737d..6dc80211 100644 --- a/tests/Makefile +++ b/tests/Makefile @@ -94,6 +94,3 @@ Makefile: ${TESTS}: ${libcommon_a} googletest $(QUIET) ${MAKE} -f ${top_dir}/testing/makefiles/testcase.mk -C $@ testcase=$@ build run - -%+run: - $(QUIET) ${MAKE} -s -f ${top_dir}/testing/makefiles/testcase.mk -C $* testcase=$* run