简体   繁体   English

在项目中没有Makefile.am的Makefile.in

[英]Makefile.in without Makefile.am in projects

In several projects I have seen the Makefile.in without Makefile.am . 在几个项目中,我看到了不带Makefile.am的Makefile.in。 Eg bash http://git.savannah.gnu.org/cgit/bash.git/tree/ and dtach http://dtach.cvs.sourceforge.net/viewvc/dtach/dtach/ 例如bash http://git.savannah.gnu.org/cgit/bash.git/tree/和dtach http://dtach.cvs.sourceforge.net/viewvc/dtach/dtach/

I always thought that Makefile.in was generated by automake. 我一直以为Makefile.in是由automake生成的。 Also with Makefile.am being a user written file I would not have thought it would be omitted from the code repository. 同样,使用Makefile.am作为用户编写的文件,我也不会想到它将从代码存储库中省略。 In the bash source tree, the Makefile.in is far too big to be hand written and the Makefile.in in dtach also looks generated. 在bash源代码树中,Makefile.in太大而无法手写,并且dtach中的Makefile.in也看起来已生成。 How was the Makefile.in generated in projects like these two? 在这两个项目中如何生成Makefile.in?

The libtool and automake autotools can be used independently of one another (or not at all), depending on what you need autoconf to do. libtoolautomake autotools可以彼此独立(或根本不独立)使用,具体取决于您需要autoconf做什么。 Therefore, it's not required to use automake to generate Makefile.in . 因此, 不需要使用automake生成Makefile.in

The automake tool also conspicuously outputs that it has been used: automake工具也明显输出,它已被使用:

# Makefile.in generated by automake 1.11.1 from Makefile.am. #由Makemake.am的automake 1.11.1生成的Makefile.in。

So it's likely that the Makefile.in s you have seen are edited "by hand". 因此,您看到的Makefile.in可能是“手动”编辑的。

A Makefile.in looks like a regular Makefile but usually it expects to be completed by the configure script (for example with the location of a library that the user has in a different directory). Makefile.in看起来像常规的Makefile,但通常希望由configure脚本完成(例如,用户在其他目录中具有的库的位置)。

Makefile.am is used by Automake to build such a Makefile.in. Automake使用Makefile.am来构建这样的Makefile.in。 If the developers that made the package you're using already had a Makefile and writing a Makefile.am for it was too much effort they just converted it to a Makefile.in. 如果制作您要使用的软件包的开发人员已经有了一个Makefile并为其编写了一个Makefile.am,那么他们会花费太多精力将其转换为Makefile.in。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM