什么是 Makefile.am 和 Makefile.in?

2024-06-18

这两个文件多出现在开源项目中。

它们的用途是什么?它们如何工作?


Makefile.am是程序员定义的文件,由automake生成Makefile.in文件(.am代表autom阿克)。 这configure通常在源 tarball 中看到的脚本将使用Makefile.in生成一个Makefile.

The configure script https://en.wikipedia.org/wiki/Configure_script其本身是从程序员定义的文件生成的,该文件名为configure.ac or configure.in(已弃用)。我更喜欢.ac (for autoconf),因为它将它与生成的Makefile.in文件,这样我就可以制定诸如make dist-clean运行的rm -f *.in。由于它是生成的文件,因此通常不会存储在 Git、SVN、Mercurial 或 CVS 等修订系统中,而是存储在.ac文件将是。

阅读更多内容GNU 自动工具 https://en.wikipedia.org/wiki/GNU_build_system。 阅读make https://en.wikipedia.org/wiki/Make_(software) and Makefile https://en.wikipedia.org/wiki/Makefile首先,然后了解automake https://en.wikipedia.org/wiki/Automake, autoconf https://en.wikipedia.org/wiki/Autoconf, libtool https://en.wikipedia.org/wiki/GNU_Libtool, etc.

本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)

什么是 Makefile.am 和 Makefile.in? 的相关文章

随机推荐