From: Jo-Philipp Wich Date: Sun, 10 Oct 2010 22:40:44 +0000 (+0000) Subject: Add two debug rules the examine the values of runtime make variables. Based on patch... X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=10f5101af3ea207e34e12af417009422777d2bcb;p=openwrt%2Fstaging%2Frmilecki.git 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 49044c8cfbf..7d3516bc427 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