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