From ae10f71dd4eb0143e3ec1740360a4f5c0005eee4 Mon Sep 17 00:00:00 2001 From: Matthijs Kooijman Date: Thu, 30 May 2013 16:09:05 +0200 Subject: [PATCH] Output configuration info only once Before, the configuration info would be shown again when running a recursive make call, or when make restarted after regenerating the dependencies file. Now, it only shows the info the first time. Closes: #46 --- arduino-mk/Arduino.mk | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) diff --git a/arduino-mk/Arduino.mk b/arduino-mk/Arduino.mk index 1064160..f068739 100644 --- a/arduino-mk/Arduino.mk +++ b/arduino-mk/Arduino.mk @@ -340,10 +340,16 @@ dir_if_exists = $(if $(wildcard $(1)$(2)),$(1)) # the number of bytes indicated by the second argument. space_pad_to = $(shell echo $(1) " " | head -c$(2)) +arduino_output = +# When output is not suppressed and we're in the top-level makefile, +# running for the first time (i.e., not after a restart after +# regenerating the dependency file), then output the configuration. ifndef ARDUINO_QUIET - arduino_output = $(info $(1)) -else - arduino_output = + ifeq ($(MAKE_RESTARTS),) + ifeq ($(MAKELEVEL),0) + arduino_output = $(info $(1)) + endif + endif endif # Call with some text, and a prefix tag if desired (like [AUTODETECTED]),