view doc/configmake.texi @ 17363:5a51fb7777a9

sys_select, sys_time: port 2013-01-30 Solaris 2.6 fix to Cygwin Problem reported by Marco Atzeri in <http://lists.gnu.org/archive/html/bug-gnulib/2013-03/msg00000.html>. * lib/sys_select.in.h [HAVE_SYS_SELECT_H && _CYGWIN_SYS_TIME_H]: Simply delegate to the system <sys/select.h> in this case too. Also, pay attention to _GL_SYS_SELECT_H_REDIRECT_FROM_SYS_TIME_H only if OSF/1, since otherwise Cygwin breaks, and it doesn't seem to be needed on Solaris either. * lib/sys_time.in.h [_CYGWIN_SYS_TIME_H]: Simply delgate to the system <sys/time.h> in this case.
author Paul Eggert <eggert@cs.ucla.edu>
date Tue, 19 Mar 2013 09:08:47 -0700
parents 90cf49c6fdd5
children
line wrap: on
line source

@node configmake
@section configmake

@findex configmake @r{module}
@cindex @file{configmake.h}, module for updating

The @code{configmake} module builds a C include file named
@file{configmake.h} containing the usual installation directory
values; for example, those specified by @code{--prefix} or
@code{--libdir} to configure.  Each variable is given a @code{#define}
with an all-uppercase macro name, such as @code{PREFIX} and
@code{LIBDIR}.  (Automake cannot create this file directly because the
user might override directory values at @code{make} time.)

Specifically, the module retrieves values of the variables through
@code{configure} followed by @code{make}, not directly through
@code{configure}, so that a user who sets some of these variables
consistently on the @code{make} command line gets correct results.

One advantage of this approach, compared to the classical approach of
adding @code{-DLIBDIR=\"$(libdir)\"} etc.@: to @code{AM_CPPFLAGS}, is
that it protects against the use of undefined variables.  That is, if,
say, @code{$(libdir)} is not set in the Makefile, @code{LIBDIR} is not
defined by this module, and code using @code{LIBDIR} gives a
compilation error.

Another advantage is that @code{make} output is shorter.

For the complete list of variables which are @code{#define}d this way,
see the file @file{gnulib/modules/configmake}, or inspect your
resulting gnulib Makefile.