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 configmake.h: Makefile
29 echo '#define PREFIX "$(prefix)"'; \
30 echo '#define EXEC_PREFIX "$(exec_prefix)"'; \
31 echo '#define BINDIR "$(bindir)"'; \
32 echo '#define SBINDIR "$(sbindir)"'; \
33 echo '#define LIBEXECDIR "$(libexecdir)"'; \
34 echo '#define DATAROOTDIR "$(datarootdir)"'; \
35 echo '#define DATADIR "$(datadir)"'; \
36 echo '#define SYSCONFDIR "$(sysconfdir)"'; \
37 echo '#define SHAREDSTATEDIR "$(sharedstatedir)"'; \
38 echo '#define LOCALSTATEDIR "$(localstatedir)"'; \
39 echo '#define INCLUDEDIR "$(includedir)"'; \
40 echo '#define OLDINCLUDEDIR "$(oldincludedir)"'; \
41 echo '#define DOCDIR "$(docdir)"'; \
42 echo '#define INFODIR "$(infodir)"'; \
43 echo '#define HTMLDIR "$(htmldir)"'; \
44 echo '#define DVIDIR "$(dvidir)"'; \
45 echo '#define PDFDIR "$(pdfdir)"'; \
46 echo '#define PSDIR "$(psdir)"'; \
47 echo '#define LIBDIR "$(libdir)"'; \
48 echo '#define LISPDIR "$(lispdir)"'; \
49 echo '#define LOCALEDIR "$(localedir)"'; \
50 echo '#define MANDIR "$(mandir)"'; \
51 echo '#define MANEXT "$(manext)"'; \
52 :) | sed '/""/d' >$@-t
55 BUILT_SOURCES += configmake.h
56 CLEANFILES += configmake.h configmake.h-t