Rewrite the Mage basics, temporarily removing the dependency-logging command
[mgear/mgear.git] / demo / Makefile
CommitLineData
00804b7c
MM
1# Very simple Mage example
2
3include mage.mk
4
5.SECONDARY:
6
8d481cf5 7all:
00804b7c 8
ff59f3cf 9cmd-xgrep = grep 'X' '$<' >'$t' && echo "Hello world from xgrep"
ac64c802 10$(call mg-define-rule,%.x,%,$(value cmd-xgrep))
00804b7c 11
ff59f3cf 12cmd-addheader = echo 'Header:' | cat - '$<' >'$t'
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