Makefile.in without Makefile.am in projects

谁都会走 提交于 2019-12-02 06:25:55

问题


In several projects I have seen the Makefile.in without Makefile.am . E.g. bash http://git.savannah.gnu.org/cgit/bash.git/tree/ and dtach http://dtach.cvs.sourceforge.net/viewvc/dtach/dtach/

I always thought that Makefile.in was generated by automake. Also with Makefile.am being a user written file I would not have thought it would be omitted from the code repository. 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. How was the Makefile.in generated in projects like these two?


回答1:


The libtool and automake autotools can be used independently of one another (or not at all), depending on what you need autoconf to do. Therefore, it's not required to use automake to generate Makefile.in.

The automake tool also conspicuously outputs that it has been used:

# Makefile.in generated by automake 1.11.1 from Makefile.am.

So it's likely that the Makefile.ins you have seen are edited "by hand".




回答2:


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.am is used by Automake to build such a 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.



来源:https://stackoverflow.com/questions/11161847/makefile-in-without-makefile-am-in-projects

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!