summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--llvm/Makefile.rules8
1 files changed, 8 insertions, 0 deletions
diff --git a/llvm/Makefile.rules b/llvm/Makefile.rules
index 52a61109d6e..06ffe005da7 100644
--- a/llvm/Makefile.rules
+++ b/llvm/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 $*)))
OpenPOWER on IntegriCloud