使 -v 返回:
GNU Make 4.2.1
Built for x86_64-pc-linux-gnu
Copyright (C) 1988-2016 Free Software Foundation, Inc.
License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html>
This is free software: you are free to change and redistribute it.
There is NO WARRANTY, to the extent permitted by law.
在一个目录下,一个文件:makefile
ifneq ($(jobserver),T)
$(error This makefile only works with a Make program that supports $$(eval))
endif
按 make 类型调用 make
makefile:2: *** This makefile only works with a Make program that supports $(eval). Stop.
即使我尝试
ifneq ($(eval),T)
$(error This makefile only works with a Make program that supports $$(eval))
endif
仍然返回
makefile:2: *** This makefile only works with a Make program that supports $(eval). Stop.
我按照在线教程进行操作,这些 makefile 测试 make 中的功能/功能是否可用。它不应该产生错误。
你错过了使用which
eval
在测试之前设置变量:如果
eval
可用,第一行将设置eval_available
为T
; 如果不是,它不会。第二行检查是否eval_available
设置为T
.