Commit | Line | Data |
---|---|---|
1 | # Very simple Mage example | |
2 | ||
3 | include mage.mk | |
4 | ||
5 | .SECONDARY: | |
6 | ||
7 | all: | |
8 | ||
9 | cmd-xgrep = grep 'X' '$<' >'$@' | |
10 | $(call mg-define-rule,%.x,%,$(value cmd-xgrep)) | |
11 | ||
12 | cmd-addheader = echo 'Header:' | cat - '$<' >'$@' | |
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 |