我应该命名“makefile”或“Makefile”? [英] Should I name "makefile" or "Makefile"?

查看:232
本文介绍了我应该命名“makefile”或“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 。通常你应该调用你的makefile makefile Makefile 。 (我们建议 Makefile ,因为它显示在靠近目录列表开头的位置,紧邻其他重要文件,例如 README 。)检查的名字, GNUmakefile ,不推荐用于大多数makefile。如果您有一个特定于GNU make 的makefile,并且make的其他版本不会理解,您应该使用此名称。其他make程序查找 makefile Makefile ,但不是 GNUmakefile

By default, when make looks for the makefile, it tries the following names, in order: GNUmakefile, makefile and Makefile. Normally you should call your makefile either makefile or Makefile. (We recommend Makefile because it appears prominently near the beginning of a directory listing, right near other important files such as README.) 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”?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆