什么是Makefile.am和Makefile.in? [英] What are Makefile.am and Makefile.in?

查看:392
本文介绍了什么是Makefile.am和Makefile.in?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

这两个文件通常在开源项目中可见.

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 automake autoconf

Read more on GNU Autotools. Read about make and Makefile first, then learn about automake, autoconf, libtool, etc.

这篇关于什么是Makefile.am和Makefile.in?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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