19.3 Automatic dependency tracking

back: language support
forward: a complex gnu autotools project
fastback: advanced gnu automake usage
up: advanced gnu automake usage
fastforward: a complex gnu autotools project
top: autoconf, automake, and libtool
contents: table of contents
index: index
about: about this document

Keeping track of dependencies for a large program is tedious and error-prone . Many edits require the programmer to update dependencies, but for some changes, such as adding a #include to an existing header, the change is large enough that he simply refuses (or does it incorrectly). To fix this problem, Automake supports automatic dependency tracking.

The implementation of automatic dependency tracking in Automake 1.4 requires gcc and GNU make . These programs are only required for maintainers; the `Makefile' s generated by make dist are completely portable. If you can't use gcc or GNU make for your project, then you are simply out of luck; you have to disable dependency tracking.

Automake 1.5 will include a completely new dependency tracking implementation. This new implementation will work with any compiler and any version of make .

Another limitation of the current scheme is that the dependencies included into the portable `Makefile' s by make dist are derived from the current build environment. First, this means that you must use make all before you can meaningfully run make dist ( otherwise the dependencies won't have been created). Second, this means that any files not built in your current tree will not have dependencies in the distributed `Makefile' s. The new implementation will avoid both of these shortcomings as well.

Automatic dependency tracking is on by default; you don't have to do anything special to get it. To turn it off, either run automake -i instead of plain automake , or put `no-dependencies' into the `AUTOMAKE_OPTIONS' macro in each `Makefile.am' .

This document was generated by Gary V. Vaughan on May, 24 2001 using texi2html

GNU Autoconf, Automake and Libtool
GNU Autoconf, Automake, and Libtool
ISBN: 1578701902
EAN: 2147483647
Year: 2002
Pages: 290

flylib.com © 2008-2017.
If you may any questions please contact us: flylib@qtcs.net