Next: , Previous: , Up: Frequently Asked Questions about Automake   [Contents][Index]

27.2 missing and AM_MAINTAINER_MODE

27.2.1 missing

The missing script is a wrapper around several maintainer tools, designed to warn users if a maintainer tool is required but missing. Typical maintainer tools are autoconf, automake, bison, etc. Because file generated by these tools are shipped with the other sources of a package, these tools shouldn’t be required during a user build and they are not checked for in configure.

However, if for some reason a rebuild rule is triggered and involves a missing tool, missing will notice it and warn the user. Besides the warning, when a tool is missing, missing will attempt to fix timestamps in a way that allows the build to continue. For instance, missing will touch configure if autoconf is not installed. When all distributed files are kept under CVS, this feature of missing allows a user with no maintainer tools to build a package off CVS, bypassing any timestamp inconsistency implied by ‘cvs update’.

If the required tool is installed, missing will run it and won’t attempt to continue after failures. This is correct during development: developers love fixing failures. However, users with wrong versions of maintainer tools may get an error when the rebuild rule is spuriously triggered, halting the build. This failure to let the build continue is one of the arguments of the AM_MAINTAINER_MODE advocates.


AM_MAINTAINER_MODE disables the so called "rebuild rules" by default. If you have AM_MAINTAINER_MODE in, and run ‘./configure && make’, then make will *never* attempt to rebuilt configure, Makefile.ins, Lex or Yacc outputs, etc. I.e., this disables build rules for files that are usually distributed and that users should normally not have to update.

If you run ‘./configure --enable-maintainer-mode’, then these rebuild rules will be active.

People use AM_MAINTAINER_MODE either because they do not want their users (or themselves) annoyed by timestamps lossage (see CVS and generated files), or because they simply can’t stand the rebuild rules and prefer running maintainer tools explicitly.

AM_MAINTAINER_MODE also allows you to disable some custom build rules conditionally. Some developers use this feature to disable rules that need exotic tools that users may not have available.

Several years ago François Pinard pointed out several arguments against this AM_MAINTAINER_MODE macro. Most of them relate to insecurity. By removing dependencies you get non-dependable builds: changes to sources files can have no effect on generated files and this can be very confusing when unnoticed. He adds that security shouldn’t be reserved to maintainers (what --enable-maintainer-mode suggests), on the contrary. If one user has to modify a, then either should be updated or a warning should be output (this is what Automake uses missing for) but the last thing you want is that nothing happens and the user doesn’t notice it (this is what happens when rebuild rules are disabled by AM_MAINTAINER_MODE).

Jim Meyering, the inventor of the AM_MAINTAINER_MODE macro was swayed by François’s arguments, and got rid of AM_MAINTAINER_MODE in all of his packages.

Still many people continue to use AM_MAINTAINER_MODE, because it helps them working on projects where all files are kept under CVS, and because missing isn’t enough if you have the wrong version of the tools.

Next: Why doesn’t Automake support wildcards?, Previous: CVS and generated files, Up: Frequently Asked Questions about Automake   [Contents][Index]