From: Jo-Philipp Wich Date: Sun, 10 Oct 2010 22:40:44 +0000 (+0000) Subject: [buildroot] Add two debug rules the examine the values of runtime make variables. X-Git-Url: http://git.openwrt.org/?p=openwrt%2Fsvn-archive%2Farchive.git;a=commitdiff_plain;h=e876351237dc9691f60a2965fe6ddb5eee0d3b8b;hp=5e17955fd5a5acdddf918329619979938906607c [buildroot] Add two debug rules the examine the values of runtime make variables. Based on patch by Philip Prindeville SVN-Revision: 23389 --- 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