Determine if Makefile is executed with gmake
问题 Say on FreeBSD an application needs to be compiled with GNU make (gmake), not the standard system make. Is there any directive I could put to the Makefile to stop executing it and print an error if the Makefile is not compiled with gmake? 回答1: Call your makefile GNUmakefile. GNU Make will find it, but not other makes. 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