上例子
LIBS=foo.k bar.k .PHONY : all all: $(LIBS) @echo final $(LIBS): %.k : text.g @echo $* text.g: echo text.g
运行结果:
text.g
foo
bar
final
结束