aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2019-10-09 17:30:30 -0400
committerfanquake <fanquake@gmail.com>2019-10-09 17:48:36 -0400
commitbc7e721d97dc5b9f46df2a46e8101f3b6ce278fe (patch)
treefac0ca8c77ef5589adaacdfdf5164256019f4198
parent42d0eca725a83c999e2b67e33dfc7bcc96288dc3 (diff)
parent181989f6c9427fc266dbdcc84cb60ac03e67cdb2 (diff)
downloadbitcoin-bc7e721d97dc5b9f46df2a46e8101f3b6ce278fe.tar.xz
Merge #17087: build: Add variable printing target to Makefiles
181989f6c9427fc266dbdcc84cb60ac03e67cdb2 build: Add variable printing target to Makefiles (Carl Dong) Pull request description: ``` I kept finding myself needing these to debug our build system, since they are innocuous and are very helpful they probably belong in the codebase. Source: John Graham-Cumming https://www.cmcrossroads.com/article/printing-value-makefile-variable ``` ACKs for top commit: MarcoFalke: ACK 181989f6c9427fc266dbdcc84cb60ac03e67cdb2 fanquake: ACK 181989f6c9427fc266dbdcc84cb60ac03e67cdb2 - concise amount of useful code. Tested on macOS. Did not visit the link. Tree-SHA512: 2139621e68a499c7347663ca9dc04e166ea6280e05986c27858df0156016ef2f9461262464d70c601419384f43a4ae3bcc67dfc0a05dbeef64f08386ab429cd8
-rw-r--r--Makefile.am4
-rw-r--r--depends/Makefile4
2 files changed, 8 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am
index 8b1e2a6b5b..49a20b7614 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -2,6 +2,10 @@
# Distributed under the MIT software license, see the accompanying
# file COPYING or http://www.opensource.org/licenses/mit-license.php.
+# Pattern rule to print variables, e.g. make print-top_srcdir
+print-%:
+ @echo $* = $($*)
+
ACLOCAL_AMFLAGS = -I build-aux/m4
SUBDIRS = src
if ENABLE_MAN
diff --git a/depends/Makefile b/depends/Makefile
index b7e9a9213e..25ff135ea6 100644
--- a/depends/Makefile
+++ b/depends/Makefile
@@ -1,5 +1,9 @@
.NOTPARALLEL :
+# Pattern rule to print variables, e.g. make print-top_srcdir
+print-%:
+ @echo $* = $($*)
+
SOURCES_PATH ?= $(BASEDIR)/sources
WORK_PATH = $(BASEDIR)/work
BASE_CACHE ?= $(BASEDIR)/built