# Can I parse makefile lines using Make's macro processor? define test-cmd $(info $(if $(findstring ^ ,^$1),yes,no): $1) endef empty := cmd-1 := $(empty) echo bar not-cmd-1 := $(empty) bar: foo not-cmd-2 := $(empty) baz: bar $(call test-cmd,$(cmd-1)) $(call test-cmd,$(not-cmd-1)) $(call test-cmd,$(not-cmd-2)) all: