summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJo-Philipp Wich <jow@openwrt.org>2010-10-10 22:40:44 +0000
committerJo-Philipp Wich <jow@openwrt.org>2010-10-10 22:40:44 +0000
commit10f5101af3ea207e34e12af417009422777d2bcb (patch)
treec94cc4093e6102d92a4275774afe125802e4a122
parent0f04c9ac37339173f3e44fc804614cea4b638f79 (diff)
downloadmtk-20170518-10f5101af3ea207e34e12af417009422777d2bcb.zip
mtk-20170518-10f5101af3ea207e34e12af417009422777d2bcb.tar.gz
mtk-20170518-10f5101af3ea207e34e12af417009422777d2bcb.tar.bz2
Add two debug rules the examine the values of runtime make variables. Based on patch by Philip Prindeville <philipp@redfish-solutions.com>
SVN-Revision: 23389
-rw-r--r--rules.mk12
1 files changed, 12 insertions, 0 deletions
diff --git a/rules.mk b/rules.mk
index 49044c8..7d3516b 100644
--- a/rules.mk
+++ b/rules.mk
@@ -254,4 +254,16 @@ all:
FORCE: ;
.PHONY: FORCE
+val.%:
+ @$(if $(filter undefined,$(origin $*)),\
+ echo "$* undefined" >&2, \
+ echo '$(subst ','"'"',$($*))' \
+ )
+
+var.%:
+ @$(if $(filter undefined,$(origin $*)),\
+ echo "$* undefined" >&2, \
+ echo "$*='"'$(subst ','"'\"'\"'"',$($*))'"'" \
+ )
+
endif #__rules_inc