可以全局制作 "assume-new" 吗?
Can Make "assume-new" globally?
默认情况下,Make 会将 "touch" 提供的目标文件 "bring it up to date"。
为避免这种情况,您可以使用 this option:
-W file, --what-if=file, --new-file=file, --assume-new=file
Pretend that the target file has just been modified. When used
with the -n flag, this shows you what would happen if you were to
modify that file. Without -n, it is almost the same as running a
touch command on the given file before running make, except that
the modification time is changed only in the imagination of make.
Makefile 本身是否有等效设置(可能是 MAKEFLAGS
选项)以在 Makefile 中定义的所有目标全局采用此选项?
我认为这可行:MAKEFLAGS=--assume-new=$(MAKECMDGOALS)
这样做有什么负面影响吗?
默认情况下,Make 会将 "touch" 提供的目标文件 "bring it up to date"。 为避免这种情况,您可以使用 this option:
-W file, --what-if=file, --new-file=file, --assume-new=file
Pretend that the target file has just been modified. When used
with the -n flag, this shows you what would happen if you were to
modify that file. Without -n, it is almost the same as running a
touch command on the given file before running make, except that
the modification time is changed only in the imagination of make.
Makefile 本身是否有等效设置(可能是 MAKEFLAGS
选项)以在 Makefile 中定义的所有目标全局采用此选项?
我认为这可行:MAKEFLAGS=--assume-new=$(MAKECMDGOALS)
这样做有什么负面影响吗?