问题描述
这两个文件通常在开源项目中可见.
These two files are mostly seen in open source projects.
它们是做什么用的,它们是如何工作的?
What are they for, and how do they work?
推荐答案
Makefile.am
是程序员定义的文件,由automake
用于生成Makefile.in
文件(.am
代表 uto m ake).通常在源压缩包中看到的configure
脚本将使用Makefile.in
生成Makefile
.
Makefile.am
is a programmer-defined file and is used by automake
to generate the Makefile.in
file (the .am
stands for automake).The configure
script typically seen in source tarballs will use the Makefile.in
to generate a Makefile
.
configure
脚本本身是由名为或configure.in
(不建议使用).我更喜欢.ac
(对于 a uto c onf),因为它可以将其与生成的Makefile.in
文件区分开来,这样我可以使用诸如make dist-clean
这样的规则运行rm -f *.in
.由于它是生成的文件,因此通常不存储在修订系统(例如Git,SVN,Mercurial或CVS)中,而.ac
文件将存储在该文件中.
The configure
script itself is generated from a programmer-defined file named either configure.ac
or configure.in
(deprecated). I prefer .ac
(for autoconf) since it differentiates it from the generated Makefile.in
files and that way I can have rules such as make dist-clean
which runs rm -f *.in
. Since it is a generated file, it is not typically stored in a revision system such as Git, SVN, Mercurial or CVS, rather the .ac
file would be.
有关 GNU自动工具的更多信息.阅读有关 make
和 Makefile
,然后了解 automake
, autoconf
, libtool
等
Read more on GNU Autotools.Read about make
and Makefile
first, then learn about automake
, autoconf
, libtool
, etc.
这篇关于什么是Makefile.am和Makefile.in?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!