我应该命名“makefile”或“Makefile”? [英] Should I name "makefile" or "Makefile"?
问题描述
虽然这两个名字都能完成这项工作,但makefiles的正确名称是什么?
Although both names will do the job, what is the correct name for makefiles?
GNU`make'homepage 使用了 Makefile ,我想这是命名它的好方法。
GNU `make' homepage uses Makefile, and I guess it is the good way to name it. Any reasons for typing the front M in upper case ?
推荐答案
您的Makefile的名称章节GNU Make手册阐明了它:
What Name to Give Your Makefile chapter of GNU Make manual clarifies it:
默认情况下,当
make
查找makefile时,按顺序尝试以下名称:GNUmakefile
,makefile
和Makefile
。通常你应该调用你的makefilemakefile
或Makefile
。 (我们建议Makefile
,因为它显示在靠近目录列表开头的位置,紧邻其他重要文件,例如README
。)检查的名字,GNUmakefile
,不推荐用于大多数makefile。如果您有一个特定于GNUmake
的makefile,并且make的其他版本不会理解,您应该使用此名称。其他make程序查找makefile
和Makefile
,但不是GNUmakefile
。
By default, when
make
looks for the makefile, it tries the following names, in order:GNUmakefile
,makefile
andMakefile
. Normally you should call your makefile eithermakefile
orMakefile
. (We recommendMakefile
because it appears prominently near the beginning of a directory listing, right near other important files such asREADME
.) 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 GNUmake
, and will not be understood by other versions of make. Other make programs look formakefile
andMakefile
, but notGNUmakefile
.
这篇关于我应该命名“makefile”或“Makefile”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!