aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMatthijs Kooijman <matthijs@stdin.nl>2013-05-30 16:09:05 +0200
committerMatthijs Kooijman <matthijs@stdin.nl>2013-05-30 19:27:11 +0200
commitae10f71dd4eb0143e3ec1740360a4f5c0005eee4 (patch)
treeead91eadabb33b87f2110cc58b301d7986a0f413
parent5ea24373116beffea81675a12363be08e2d0e0c8 (diff)
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
-rw-r--r--arduino-mk/Arduino.mk12
1 files 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]),