I am newbie of Autotools. From my understanding, one would use the following basic steps to build software using Autotools:
autoreconf --install
./configure
make
However, I noticed that most open source software packages (on Linux) does not need the step 1. They most time just need step 2 and 3 to build. It seems that they already are packaged with Makefile.in
. I am wondering why? Do they manually code the Makefile.in
, or the software developer uses autoreconf
to generate the Makefile.in
before creating the software package?
Thanks.
autoreconf is a Autotool which is used to create automatically buildable source code for Unix-like systems. Autotool is a common name for autoconf, automake, etc. These all together are termed as Autotools.
The dh-autoreconf package supplies dh module/debhelper/cdbs commands to run autoreconf and restore the original source files on clean. These commands are run by default when using the dh sequencer since debhelper compatibility level 10.
The autogen.sh script generates the configure script (from configure.ac , using autoconf) and any files it needs (like creating Makefile.in from Makefile.am using automake).
Autotools configurationThis file is used by autoconf to create the configure shell script that users run before building. The file must contain, at the very least, the AC_INIT and AC_OUTPUT M4 macros.
The software developer who creates the tarball (or who checks out the sources from a version control system) will usually invoke autoreconf
from a script called bootstrap.sh
or autogen.sh
which may do other stuff. autoreconf
might be invoked by Makefile
as well (like when configure.ac
has changed).
Most users will never need to run autoreconf
, even those who are making some modifications to source (e.g. patches). Only those who need to make modifications to the package itself (making changes to configure.ac
and/or Makefile.am
) will need autoreconf
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With