我在makefile中有以下内容:
.PHONY: preq_test a b c d
a b c d:
@echo building $@
preq_test : a b | c d
@echo preq prequisites are: $^;
现在,$^
应该根据文档列出所有先决条件(除了重复项):
$^
$+
The names of all the prerequisites, with spaces between them. For prerequisites
which are archive members, only the named member is used (see Archives). The value
of $^ omits duplicate prerequisites, while $+ retains them and preserves their
order.
但仅订购的先决条件未出现在$^
:
building a
building b
building c
building d
preq prequisites are: a b
我可以依赖当前的行为,还是应该以其他方式工作,或者这应该被视为未定义的行为?
谢谢,
约翰