aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Dunbar <daniel@zuster.org>2009-02-21 20:42:39 +0000
committerDaniel Dunbar <daniel@zuster.org>2009-02-21 20:42:39 +0000
commit92acef0e9409d782e5ec829c4acd56242ad83586 (patch)
tree6833f3c9be1f446441f021fed1aed630250a2f5b
parent278f83daebd1d2072a4ce6892fa3481db5cdefbe (diff)
Add makefile debugging target; use "make print-FOO" to print the
value/definition/origin of FOO. git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@65245 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r--Makefile.rules8
1 files changed, 8 insertions, 0 deletions
diff --git a/Makefile.rules b/Makefile.rules
index 52a61109d6..06ffe005da 100644
--- a/Makefile.rules
+++ b/Makefile.rules
@@ -1765,3 +1765,11 @@ printvars::
$(Echo) "SubDirs : " '$(SubDirs)'
$(Echo) "ProjLibsPaths: " '$(ProjLibsPaths)'
$(Echo) "ProjLibsOptions: " '$(ProjLibsOptions)'
+
+###
+# Debugging
+
+# General debugging rule, use 'make print-XXX' to print the
+# definition, value and origin of XXX.
+print-%:
+ $(error PRINT: $(value $*) = "$($*)" (from $(origin $*)))