5 @cindex @file{configmake.h}, module for updating
7 The @code{configmake} module builds a C include file named
8 @file{configmake.h} containing the usual installation directory
9 values; for example, those specified by @code{--prefix} or
10 @code{--libdir} to configure. Each variable is given a @code{#define}
11 with an all-uppercase macro name, such as @code{PREFIX} and
12 @code{LIBDIR}. (Automake cannot create this file directly because the
13 user might override directory values at @code{make} time.)
15 Specifically, the module retrieves values of the variables through
16 @code{configure} followed by @code{make}, not directly through
17 @code{configure}, so that a user who sets some of these variables
18 consistently on the @code{make} command line gets correct results.
20 One advantage of this approach, compared to the classical approach of
21 adding @code{-DLIBDIR=\"$(libdir)\"} etc.@: to @code{AM_CPPFLAGS}, is
22 that it protects against the use of undefined variables. That is, if,
23 say, @code{$(libdir)} is not set in the Makefile, @code{LIBDIR} is not
24 defined by this module, and code using @code{LIBDIR} gives a
27 Another advantage is that @code{make} output is shorter.
29 For the complete list of variables which are @code{#define}d this way,
30 see the file @file{gnulib/modules/configmake}, or inspect your
31 resulting gnulib Makefile.