简体   繁体   中英

Makefile.in without Makefile.am in projects

In several projects I have seen the Makefile.in without Makefile.am . Eg 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?

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.in s you have seen are edited "by hand".

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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