aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorXiretza <xiretza@xiretza.xyz>2020-04-11 11:42:30 +0200
committerXiretza <xiretza@xiretza.xyz>2020-04-11 13:23:08 +0200
commit333981acfdf0d7ab0db35f7d2b41e51cf66d6b71 (patch)
tree0892b046a0c7bd980bc01a20565461c3b4fa3ff5
parent93ef516d919b40ace2099bc7586bfda8648f0757 (diff)
downloadyosys-333981acfdf0d7ab0db35f7d2b41e51cf66d6b71.tar.gz
yosys-333981acfdf0d7ab0db35f7d2b41e51cf66d6b71.tar.bz2
yosys-333981acfdf0d7ab0db35f7d2b41e51cf66d6b71.zip
Suppress output of Makefile.conf when printing source versions
The make targets echo-yosys-ver, echo-git-ver and echo-abc-rev can be used to programmatically extract contents of make variables for external scripts. Unfortunately, when a Makefile.conf exists, its contents would also be echoed, making the output almost unusable. This patch selectively disables this functionality for these special targets.
-rw-r--r--Makefile3
1 files changed, 3 insertions, 0 deletions
diff --git a/Makefile b/Makefile
index 3f8922bfd..f6d25133c 100644
--- a/Makefile
+++ b/Makefile
@@ -148,7 +148,10 @@ define newline
endef
ifneq ($(wildcard Makefile.conf),)
+# don't echo Makefile.conf contents when invoked to print source versions
+ifeq ($(findstring echo-,$(MAKECMDGOALS)),)
$(info $(subst $$--$$,$(newline),$(shell sed 's,^,[Makefile.conf] ,; s,$$,$$--$$,;' < Makefile.conf | tr -d '\n' | sed 's,\$$--\$$$$,,')))
+endif
include Makefile.conf
endif