missing
and AM_MAINTAINER_MODE
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 which allow 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 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
AM_MAINTAINER_MODE
disables the so called "rebuild rules" by
default. If you have AM_MAINTAINER_MODE
in
configure.ac
, and run ./configure && make
, then
make
will *never* attempt to rebuilt configure
,
Makefile.in
s, Lex or Yacc outputs, etc. I.e., this disables
build rules for files which 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 want their
users (or themselves) annoyed by timestamps lossage (see CVS), 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 AM_MAINTAINER_MODE
. Most of them relate to insecurity.
By removing dependencies you get non-dependable builds: change 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
Makefile.am
, then either Makefile.in
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.