gpt4 book ai didi

coding-style - 我应该命名 "makefile"还是 "Makefile"?

转载 作者:行者123 更新时间:2023-12-03 09:08:05 25 4
gpt4 key购买 nike

尽管这两个名称都可以完成这项工作,但生成文件的正确名称是什么?

GNU `make' homepage使用 Makefile,我想这是命名它的好方法。用大写字母输入前面的 M 有什么原因吗?

最佳答案

What Name to Give Your Makefile GNU Make 手册的章节对此进行了澄清:

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.

关于coding-style - 我应该命名 "makefile"还是 "Makefile"?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12669367/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com