unigbrk.in.h: Fix typo: "ben" => "been".
[gnulib.git] / modules / configmake
1 Description:
2 Variables set by "configure" or "make".
3
4 Files:
5 m4/configmake.m4
6
7 Depends-on:
8
9 configure.ac:
10 gl_CONFIGMAKE_PREP
11
12 Makefile.am:
13 # Retrieve values of the variables through 'configure' followed by
14 # 'make', not directly through 'configure', so that a user who
15 # sets some of these variables consistently on the 'make' command
16 # line gets correct results.
17 #
18 # One advantage of this approach, compared to the classical
19 # approach of adding -DLIBDIR=\"$(libdir)\" etc. to AM_CPPFLAGS,
20 # is that it protects against the use of undefined variables.
21 # If, say, $(libdir) is not set in the Makefile, LIBDIR is not
22 # defined by this module, and code using LIBDIR gives a
23 # compilation error.
24 #
25 # Another advantage is that 'make' output is shorter.
26 #
27 # Listed in the same order as the GNU makefile conventions, and
28 # provided by autoconf 2.59c+.
29 # The Automake-defined pkg* macros are appended, in the order
30 # listed in the Automake 1.10a+ documentation.
31 configmake.h: Makefile
32         $(AM_V_GEN)rm -f $@-t && \
33         { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \
34           echo '#define PREFIX "$(prefix)"'; \
35           echo '#define EXEC_PREFIX "$(exec_prefix)"'; \
36           echo '#define BINDIR "$(bindir)"'; \
37           echo '#define SBINDIR "$(sbindir)"'; \
38           echo '#define LIBEXECDIR "$(libexecdir)"'; \
39           echo '#define DATAROOTDIR "$(datarootdir)"'; \
40           echo '#define DATADIR "$(datadir)"'; \
41           echo '#define SYSCONFDIR "$(sysconfdir)"'; \
42           echo '#define SHAREDSTATEDIR "$(sharedstatedir)"'; \
43           echo '#define LOCALSTATEDIR "$(localstatedir)"'; \
44           echo '#define INCLUDEDIR "$(includedir)"'; \
45           echo '#define OLDINCLUDEDIR "$(oldincludedir)"'; \
46           echo '#define DOCDIR "$(docdir)"'; \
47           echo '#define INFODIR "$(infodir)"'; \
48           echo '#define HTMLDIR "$(htmldir)"'; \
49           echo '#define DVIDIR "$(dvidir)"'; \
50           echo '#define PDFDIR "$(pdfdir)"'; \
51           echo '#define PSDIR "$(psdir)"'; \
52           echo '#define LIBDIR "$(libdir)"'; \
53           echo '#define LISPDIR "$(lispdir)"'; \
54           echo '#define LOCALEDIR "$(localedir)"'; \
55           echo '#define MANDIR "$(mandir)"'; \
56           echo '#define MANEXT "$(manext)"'; \
57           echo '#define PKGDATADIR "$(pkgdatadir)"'; \
58           echo '#define PKGINCLUDEDIR "$(pkgincludedir)"'; \
59           echo '#define PKGLIBDIR "$(pkglibdir)"'; \
60           echo '#define PKGLIBEXECDIR "$(pkglibexecdir)"'; \
61         } | sed '/""/d' > $@-t && \
62         if test -f $@ && cmp $@-t $@ > /dev/null; then \
63           rm -f $@-t; \
64         else \
65           rm -f $@; mv $@-t $@; \
66         fi
67
68 BUILT_SOURCES += configmake.h
69 CLEANFILES += configmake.h configmake.h-t
70
71 Include:
72 /* Include only after all system include files.  */
73 "configmake.h"
74
75 License:
76 LGPLv2+
77
78 Maintainer:
79 all