- Add a full target obfuscation factory and rule and a comment explaining them.
[mgear/mgear.git] / demo / Makefile
CommitLineData
00804b7c
MM
1# Very simple Mage example
2
3include mage.mk
4
5.SECONDARY:
6
8d481cf5 7all:
00804b7c
MM
8
9cmd-xgrep = grep 'X' '$<' >'$@'
ac64c802 10$(call mg-define-rule,%.x,%,$(value cmd-xgrep))
00804b7c
MM
11
12cmd-addheader = echo 'Header:' | cat - '$<' >'$@'
ac64c802 13$(call mg-define-rule,%.h,%,$(value cmd-addheader))
8d481cf5
MM
14
15# Testing obfuscation
16mainoid := $(newoid)
17all: $(mainoid)
18$(mainoid)@opr:=foo.x.h