X-Git-Url: https://mattmccutchen.net/mgear/mgear.git/blobdiff_plain/00804b7cdba8a57acd8583d6326f728b5ce15516..0382f3351db8ba1e76ce006859783b7d49622892:/demo/Makefile diff --git a/demo/Makefile b/demo/Makefile index 2e20b36..ff220b6 100644 --- a/demo/Makefile +++ b/demo/Makefile @@ -1,13 +1,24 @@ -# Very simple Mage example +# Very simple mgear example -include mage.mk +include mgear.mk .SECONDARY: -foo.x.h: +all: -cmd-xgrep = grep 'X' '$<' >'$@' -$(call mg-rule,%.x,%,$(value cmd-xgrep)) +cmd-xgrep = grep 'X' '$<' >'$@' && echo "Hello world from xgrep" +$(call mg-define-rule,%.x,%,cmd-xgrep) cmd-addheader = echo 'Header:' | cat - '$<' >'$@' -$(call mg-rule,%.h,%,$(value cmd-addheader)) +$(call mg-define-rule,%.h,%,cmd-addheader) + +# Testing obfuscation +mainoid := $(newoid) +all: $(mainoid) +$(mainoid)@opr:=foo.x.h +$(mainoid)@ocmd:= + +clean: + $(call mg-clean-cmd,.) +.PHONY: clean + \ No newline at end of file