Improve target metadata comments and implement $(bar@checked).
[mgear/mgear.git] / demo / Makefile
index 2e20b36..b8a7ab7 100644 (file)
@@ -4,10 +4,15 @@ include mage.mk
 
 .SECONDARY:
 
-foo.x.h:
+all:
 
-cmd-xgrep = grep 'X' '$<' >'$@'
-$(call mg-rule,%.x,%,$(value cmd-xgrep))
+cmd-xgrep = grep 'X' '$<' >'$t' && echo "Hello world from xgrep"
+$(call mg-define-rule,%.x,%,$(value cmd-xgrep))
 
-cmd-addheader = echo 'Header:' | cat - '$<' >'$@'
-$(call mg-rule,%.h,%,$(value cmd-addheader))
+cmd-addheader = echo 'Header:' | cat - '$<' >'$t'
+$(call mg-define-rule,%.h,%,$(value cmd-addheader))
+
+# Testing obfuscation
+mainoid := $(newoid)
+all: $(mainoid)
+$(mainoid)@opr:=foo.x.h