- Reuse $(@cmd) instead of accumulating $(foo@cmd). Reduces memory and may help
[mgear/mgear.git] / demo / Makefile
CommitLineData
099638eb 1# Very simple mgear example
00804b7c 2
099638eb 3include mgear.mk
00804b7c
MM
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
eeabaff8 19$(mainoid)@ocmd:=
59ba5775
MM
20
21clean:
22 $(call mg-clean-cmd,.)
23.PHONY: clean
24