.SECONDARY:
-foo.x.h:
+all:
cmd-xgrep = grep 'X' '$<' >'$@'
-$(call mg-rule,%.x,%,$(value cmd-xgrep))
+$(call mg-define-rule,%.x,%,$(value cmd-xgrep))
cmd-addheader = echo 'Header:' | cat - '$<' >'$@'
-$(call mg-rule,%.h,%,$(value cmd-addheader))
+$(call mg-define-rule,%.h,%,$(value cmd-addheader))
+
+# Testing obfuscation
+mainoid := $(newoid)
+all: $(mainoid)
+$(mainoid)@opr:=foo.x.h