我在makefile中有以下内容:
.PHONY: preq_test a b c d
a b c d:
@echo building $@
preq_test : a b | c d
@echo preq prequisites are: $^;
Run Code Online (Sandbox Code Playgroud)
现在,$^应该根据文档列出所有先决条件(除了重复):
$^
$+
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.
Run Code Online (Sandbox Code Playgroud)
但仅限订单的先决条件不会出现在$^:
building a
building b
building c
building d
preq prequisites are: a b
Run Code Online (Sandbox Code Playgroud)
我可以依赖当前的行为,还是应该以其他方式工作,还是应该将其视为未定义的行为?
谢谢,
约翰
| 归档时间: |
|
| 查看次数: |
489 次 |
| 最近记录: |