summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>2010-10-10 22:40:44 +0000
committerjow <jow@3c298f89-4303-0410-b956-a3cf2f4a3e73>2010-10-10 22:40:44 +0000
commit36d3a76afb32eda306753361abf13c3d4c41e555 (patch)
tree5f557a8a16a270472ede56d8e15b62db8db30e8f
parent8803d870832f71a3997d6afbd1a5cd0de1ba017f (diff)
[buildroot] Add two debug rules the examine the values of runtime make variables.
Based on patch by Philip Prindeville <philipp@redfish-solutions.com> git-svn-id: svn://svn.openwrt.org/openwrt/trunk@23389 3c298f89-4303-0410-b956-a3cf2f4a3e73
-rw-r--r--rules.mk12
1 files changed, 12 insertions, 0 deletions
diff --git a/rules.mk b/rules.mk
index 49044c8cf..7d3516bc4 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