Next: , Up: Changing Automake’s Behavior   [Contents][Index]

17.1 Options generalities

Various features of Automake can be controlled by options. Except where noted otherwise, options can be specified in one of several ways. Most options can be applied on a per-Makefile basis when listed in a special Makefile variable named AUTOMAKE_OPTIONS. Some of these options only make sense when specified in the toplevel file. Options are applied globally to all processed Makefile files when listed in the first argument of AM_INIT_AUTOMAKE in, and some options which require changes to the configure script can only be specified there. These are annotated below.

As a general rule, options specified in AUTOMAKE_OPTIONS take precedence over those specified in AM_INIT_AUTOMAKE, which in turn take precedence over those specified on the command line.

Also, some care must be taken about the interactions among strictness level and warning categories. As a general rule, strictness-implied warnings are overridden by those specified by explicit options. For example, even if ‘portability’ warnings are disabled by default in foreign strictness, a usage like this will end up enabling them:

AUTOMAKE_OPTIONS = -Wportability foreign

However, a strictness level specified in a higher-priority context will override all the explicit warnings specified in a lower-priority context. For example, if contains:


and contains:


then ‘portability’ warnings will be disabled in