假设在 FreeBSD 上,应用程序需要使用 GNU make (gmake) 编译,而不是标准系统 make。如果 Makefile 不是用 gmake 编译的,是否有任何指令我可以放在 Makefile 中以停止执行它并打印错误?
最佳答案
Call your makefile GNUmakefile
. GNU Make 会找到它,但不会找到其他 make。
The first name checked, GNUmakefile, is not recommended for most makefiles. You should use this name if you have a makefile that is specific to GNU make, and will not be understood by other versions of make. Other make programs look for makefile and Makefile, but not GNUmakefile.
关于makefile - 判断Makefile是否用gmake执行,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11775109/