Autoconf, Automake, and Libtool: Maintaining Input Files

| ## 5.3 Maintaining Input Files If you edit any of the GNU Autotools input files in your package, it is necessary to regenerate the machine generated files for these changes to take effect. For instance, if you add a new source file to the `foonly_SOURCES` variable in ``Makefile.am'`. It is necessary to re-generate the derived file ``Makefile.in'`. If you are building your package, you need to re-run `configure` to re-generate the site-specific ``Makefile'`, and then re-run `make` to compile the new source file and link it into ``foonly'`. It is possible to regenerate these files by running the required tools, one at a time. However, as we can see above, it can be difficult to compute the dependencies--does a particular change require `aclocal` to be run? Does a particular change require `autoconf` to be run? There are two solutions to this problem. The first solution is to use the `autoreconf` command. This tool regenerates all derived files by re-running all of the necessary tools in the correct order. It is somewhat of a brute force solution, but it works very well, particularly if you are not trying to accommodate other maintainers, or regular maintenance that would render this command bothersome. The alternative is Automake's `maintainer mode'. By invoking the `AM_MAINTAINER_MODE` macro from ``configure.in'`, automake will activate an ``--enable-maintainer-mode'` option in ``configure'`. This is explained at length in 8. Bootstrapping.

This document was generated by Gary V. Vaughan on February, 8 2006 using texi2html