- Reuse $(@cmd) instead of accumulating $(foo@cmd). Reduces memory and may help
[mgear/mgear.git] / experiments / match-command.mk
CommitLineData
00804b7c
MM
1# Can I parse makefile lines using Make's macro processor?
2
3define test-cmd
4$(info $(if $(findstring ^ ,^$1),yes,no): $1)
5endef
6
7empty :=
8cmd-1 := $(empty) echo bar
9not-cmd-1 := $(empty) bar: foo
10not-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
16all: