automake: User Variables

1 
1 3.6 Variables reserved for the user
1 ===================================
1 
1 Some ‘Makefile’ variables are reserved by the GNU Coding Standards for
1 the use of the “user”—the person building the package.  For instance,
1 ‘CFLAGS’ is one such variable.
1 
1    Sometimes package developers are tempted to set user variables such
1 as ‘CFLAGS’ because it appears to make their job easier.  However, the
1 package itself should never set a user variable, particularly not to
1 include switches that are required for proper compilation of the
1 package.  Since these variables are documented as being for the package
1 builder, that person rightfully expects to be able to override any of
1 these variables at build time.
1 
1    To get around this problem, Automake introduces an automake-specific
1 shadow variable for each user flag variable.  (Shadow variables are not
1 introduced for variables like ‘CC’, where they would make no sense.)
1 The shadow variable is named by prepending ‘AM_’ to the user variable’s
1 name.  For instance, the shadow variable for ‘YFLAGS’ is ‘AM_YFLAGS’.
1 The package maintainer—that is, the author(s) of the ‘Makefile.am’ and
1 ‘configure.ac’ files—may adjust these shadow variables however
1 necessary.
1 
1    ⇒Flag Variables Ordering, for more discussion about these
1 variables and how they interact with per-target variables.
1