summaryrefslogtreecommitdiffstats
path: root/rules.mk
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 /rules.mk
parent0f04c9ac37339173f3e44fc804614cea4b638f79 (diff)
downloadmaster-31e0f0ae-10f5101af3ea207e34e12af417009422777d2bcb.tar.gz
master-31e0f0ae-10f5101af3ea207e34e12af417009422777d2bcb.tar.bz2
master-31e0f0ae-10f5101af3ea207e34e12af417009422777d2bcb.zip
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
Diffstat (limited to 'rules.mk')
-rw-r--r--rules.mk12
1 files changed, 12 insertions, 0 deletions
diff --git a/rules.mk b/rules.mk
index 49044c8cfb..7d3516bc42 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