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