X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=modules%2Fconfigmake;h=5a60f4f8078e157c43c9eaf878ad06ef2a14710f;hb=23eecb48e39afd0d267d64d40ba6bf97aa865e13;hp=8090a33c4fc3afe4ab0eab8d2e1344349fb844ca;hpb=0a97da1f8eb46cb449f137a46ddb2b5e0719810d;p=gnulib.git diff --git a/modules/configmake b/modules/configmake index 8090a33c4..5a60f4f80 100644 --- a/modules/configmake +++ b/modules/configmake @@ -1,30 +1,22 @@ Description: -Variables set by "configure" or "make". +Access from source code to variables set by "configure" or "make". Files: +m4/configmake.m4 Depends-on: configure.ac: +gl_CONFIGMAKE_PREP Makefile.am: -# Retrieve values of the variables through 'configure' followed by -# 'make', not directly through 'configure', so that a user who -# sets some of these variables consistently on the 'make' command -# line gets correct results. -# -# One advantage of this approach, compared to the classical -# approach of adding -DLIBDIR=\"$(libdir)\" etc. to AM_CPPFLAGS, -# is that it protects against the use of undefined variables. -# If, say, $(libdir) is not set in the Makefile, LIBDIR is not -# defined by this module, and code using LIBDIR gives a -# compilation error. -# -# Another advantage is that 'make' output is shorter. -# -# Listed in the same order as the GNU makefile conventions. +# Listed in the same order as the GNU makefile conventions, and +# provided by autoconf 2.59c+ or 2.70. +# The Automake-defined pkg* macros are appended, in the order +# listed in the Automake 1.10a+ documentation. configmake.h: Makefile - ( \ + $(AM_V_GEN)rm -f $@-t && \ + { echo '/* DO NOT EDIT! GENERATED AUTOMATICALLY! */'; \ echo '#define PREFIX "$(prefix)"'; \ echo '#define EXEC_PREFIX "$(exec_prefix)"'; \ echo '#define BINDIR "$(bindir)"'; \ @@ -35,6 +27,7 @@ configmake.h: Makefile echo '#define SYSCONFDIR "$(sysconfdir)"'; \ echo '#define SHAREDSTATEDIR "$(sharedstatedir)"'; \ echo '#define LOCALSTATEDIR "$(localstatedir)"'; \ + echo '#define RUNSTATEDIR "$(runstatedir)"'; \ echo '#define INCLUDEDIR "$(includedir)"'; \ echo '#define OLDINCLUDEDIR "$(oldincludedir)"'; \ echo '#define DOCDIR "$(docdir)"'; \ @@ -48,16 +41,22 @@ configmake.h: Makefile echo '#define LOCALEDIR "$(localedir)"'; \ echo '#define MANDIR "$(mandir)"'; \ echo '#define MANEXT "$(manext)"'; \ - :) | sed '/""/d' >$@-t - mv $@-t $@ + echo '#define PKGDATADIR "$(pkgdatadir)"'; \ + echo '#define PKGINCLUDEDIR "$(pkgincludedir)"'; \ + echo '#define PKGLIBDIR "$(pkglibdir)"'; \ + echo '#define PKGLIBEXECDIR "$(pkglibexecdir)"'; \ + } | sed '/""/d' > $@-t && \ + mv -f $@-t $@ + BUILT_SOURCES += configmake.h CLEANFILES += configmake.h configmake.h-t Include: +/* Include only after all system include files. */ "configmake.h" License: -LGPL +LGPLv2+ Maintainer: all