Changes necessary and proper to get mgear to build rsync:
[mgear/mgear.git] / demo / Makefile
index 2e20b36..ff220b6 100644 (file)
@@ -1,13 +1,24 @@
-# Very simple Mage example
+# Very simple mgear example
 
-include mage.mk
+include mgear.mk
 
 .SECONDARY:
 
-foo.x.h:
+all:
 
-cmd-xgrep = grep 'X' '$<' >'$@'
-$(call mg-rule,%.x,%,$(value cmd-xgrep))
+cmd-xgrep = grep 'X' '$<' >'$@' && echo "Hello world from xgrep"
+$(call mg-define-rule,%.x,%,cmd-xgrep)
 
 cmd-addheader = echo 'Header:' | cat - '$<' >'$@'
-$(call mg-rule,%.h,%,$(value cmd-addheader))
+$(call mg-define-rule,%.h,%,cmd-addheader)
+
+# Testing obfuscation
+mainoid := $(newoid)
+all: $(mainoid)
+$(mainoid)@opr:=foo.x.h
+$(mainoid)@ocmd:=
+
+clean:
+       $(call mg-clean-cmd,.)
+.PHONY: clean
+       
\ No newline at end of file