define target
echo $0
echo $1
echo $2
endef
all:
$(call target,hello, world)
clean:
$(call target,clean)
.PHONY: all clean
执行make 或者make all
执行的结果是:
echo target
target
echo hello
hello
echo world
world
define target
echo $0
echo $1
echo $2
endef
all:
$(call target,hello, world)
clean:
$(call target,clean)
.PHONY: all clean
执行make 或者make all
执行的结果是:
echo target
target
echo hello
hello
echo world
world