Here's what I have so far related to the Mage build tool.
[mgear/mgear.git] / experiments / match-command.mk
1 # Can I parse makefile lines using Make's macro processor? 
2
3 define test-cmd
4 $(info $(if $(findstring ^      ,^$1),yes,no): $1)
5 endef
6
7 empty :=
8 cmd-1 := $(empty)       echo bar
9 not-cmd-1 := $(empty)  bar: foo
10 not-cmd-2 := $(empty)   baz: bar
11
12 $(call test-cmd,$(cmd-1))
13 $(call test-cmd,$(not-cmd-1))
14 $(call test-cmd,$(not-cmd-2))
15
16 all: