From 7a1d72669670b059aeacd2bf7affa7a4a95ef511 Mon Sep 17 00:00:00 2001
From: Richo Healey <richo@psych0tik.net>
Date: Fri, 10 Apr 2015 17:01:09 -0700
Subject: [PATCH] mk: Add a printer helper to the make setup

Also add docs because not being able to discover these things is the
pits.
---
 Makefile.in | 7 +++++++
 mk/util.mk  | 3 +++
 2 files changed, 10 insertions(+)

diff --git a/Makefile.in b/Makefile.in
index e7ad2aec7be..ec5c099372b 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -159,6 +159,13 @@
 #
 # Admittedly this is a little convoluted.
 #
+# If you find yourself working on the make infrastructure itself, and trying to
+# find the value of a given variable after expansion, you can use:
+#
+# make print-VARIABLE_NAME
+#
+# To extract it
+#
 # </nitty-gritty>
 #
 
diff --git a/mk/util.mk b/mk/util.mk
index b419c0bbe8e..3664236eabd 100644
--- a/mk/util.mk
+++ b/mk/util.mk
@@ -16,4 +16,7 @@ else
   E = echo $(1)
 endif
 
+print-%:
+	@echo $*=$($*)
+
 S := $(CFG_SRC_DIR)