瀏覽代碼

Add two debug rules the examine the values of runtime make variables. Based on patch by Philip Prindeville <[email protected]>

SVN-Revision: 23389
Jo-Philipp Wich 15 年之前
父節點
當前提交
10f5101af3
共有 1 個文件被更改,包括 12 次插入0 次删除
  1. 12 0
      rules.mk

+ 12 - 0
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