- Reuse $(@cmd) instead of accumulating $(foo@cmd). Reduces memory and may help
[mgear/mgear.git] / demo / Makefile
1 # Very simple mgear example
2
3 include mgear.mk
4
5 .SECONDARY:
6
7 all:
8
9 cmd-xgrep = grep 'X' '$<' >'$t' && echo "Hello world from xgrep"
10 $(call mg-define-rule,%.x,%,$(value cmd-xgrep))
11
12 cmd-addheader = echo 'Header:' | cat - '$<' >'$t'
13 $(call mg-define-rule,%.h,%,$(value cmd-addheader))
14
15 # Testing obfuscation
16 mainoid := $(newoid)
17 all: $(mainoid)
18 $(mainoid)@opr:=foo.x.h
19 $(mainoid)@ocmd:=
20
21 clean:
22         $(call mg-clean-cmd,.)
23 .PHONY: clean
24