Rewrite the Mage basics, temporarily removing the dependency-logging command
[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' '$<' >'$t' && echo "Hello world from xgrep"
10$(call mg-define-rule,%.x,%,$(value cmd-xgrep))
11
12cmd-addheader = echo 'Header:' | cat - '$<' >'$t'
13$(call mg-define-rule,%.h,%,$(value cmd-addheader))
14
15# Testing obfuscation
16mainoid := $(newoid)
17all: $(mainoid)
18$(mainoid)@opr:=foo.x.h