1) autoconf - creates shippable configure script (which the installer will run to make the Makefile)
2) automake - creates shippable Makefile.in (which configure will later read to make the Makefile)
INSTALLER runs these:
1) ./configure - creates the Makefile (from Makefile.in).
2) make - creates the application (from the Makefile just created).
3) sudo make install - installs the application - By default the files are (often) installed into /usr/local.
INPUTS -> PROGRAMS -> OUTPUTS:
DEVELOPER runs these:
configure.in -> autoconf -> configure (script) <---- Note! configure.in is depreciated. configure.ac -> autoconf -> configure (script) <---- Now use configure.ac / (*.ac = autoconf)
Makefile -> make -> (the new software in your downloads or temporary directory) Makefile -> make install -> (puts new software in system directory)
"Autoconf is an extensible package of M4 macros that produce shell scripts to automatically configure software source code packages. These scripts can adapt the packages to many kinds of UNIX-like systems without manual user intervention. Autoconf creates a configuration script for a package from a template file that lists the operating system features that the package can use, in the form of M4 macro calls."
"Automake is a tool for automatically generating Makefile.in files compliant with the GNU Coding Standards. Automake requires the use of Autoconf."
Interesting facts: The main configure.ac used to build LibreOffice is over 12k lines of code, (but there are also 57 other configure.ac files in subfolders.)
From this my generated configure is over 41k lines of code.
While the Makefile.in and Makefile are both only 493 lines of code. (But, there are also 768 more Makefile.in's in subfolders.)
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.
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.
Simple example
Shamelessly adapted from: http://www.gnu.org/software/automake/manual/html_node/Creating-amhello.html and tested on Ubuntu 14.04 Automake 1.14.1.
Makefile.am
README.md
configure.ac
src/Makefile.am
src/main.c
Usage
This outputs:
Notes
autoreconf --install
generates several template files which should be tracked by Git, includingMakefile.in
. It only needs to be run the first time.make install
installs:/usr/local/bin
README.md
to/usr/local/share/doc/automake_hello_world
On GitHub for you to try it out.
DEVELOPER runs these:
1) autoconf - creates shippable configure script (which the installer will run to make the Makefile)
2) automake - creates shippable Makefile.in (which configure will later read to make the Makefile)
INSTALLER runs these:
1) ./configure - creates the Makefile (from Makefile.in).
2) make - creates the application (from the Makefile just created).
3) sudo make install - installs the application - By default the files are (often) installed into /usr/local.
INPUTS -> PROGRAMS -> OUTPUTS:
DEVELOPER runs these:
configure.in -> autoconf -> configure (script) <---- Note! configure.in is depreciated.
configure.ac -> autoconf -> configure (script) <---- Now use configure.ac / (*.ac = autoconf)
Makefile.am -> automake -> Makefile.in / (*.am = automake)
INSTALLER runs these:
Makefile.in -> configure -> Makefile (*.in = input file)
Makefile -> make -> (the new software in your downloads or temporary directory)
Makefile -> make install -> (puts new software in system directory)
"Autoconf is an extensible package of M4 macros that produce shell scripts to automatically configure software source code packages. These scripts can adapt the packages to many kinds of UNIX-like systems without manual user intervention. Autoconf creates a configuration script for a package from a template file that lists the operating system features that the package can use, in the form of M4 macro calls."
"Automake is a tool for automatically generating Makefile.in files compliant with the GNU Coding Standards. Automake requires the use of Autoconf."
Manuals:
Interesting facts:
The main configure.ac used to build LibreOffice is over 12k lines of code, (but there are also 57 other configure.ac files in subfolders.)
From this my generated configure is over 41k lines of code.
While the Makefile.in and Makefile are both only 493 lines of code. (But, there are also 768 more Makefile.in's in subfolders.)
reference :
Makefile.am -- a user input file to automake
configure.in -- a user input file to autoconf
autoconf generates configure from configure.in
automake gererates Makefile.in from Makefile.am
configure generates Makefile from Makefile.in
For ex:
Makefile.am
is a programmer-defined file and is used byautomake
to generate theMakefile.in
file (the.am
stands for automake). Theconfigure
script typically seen in source tarballs will use theMakefile.in
to generate aMakefile
.The
configure
script itself is generated from a programmer-defined file named eitherconfigure.ac
orconfigure.in
(deprecated). I prefer.ac
(for autoconf) since it differentiates it from the generatedMakefile.in
files and that way I can have rules such asmake dist-clean
which runsrm -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.Read more on GNU Autotools. Read about
make
andMakefile
first, then learn aboutautomake
,autoconf
,libtool
, etc.