diff options
-rw-r--r-- | GNUmakefile | 28 | ||||
-rw-r--r-- | doc/gendocs_template | 6 | ||||
-rw-r--r-- | gl/m4/gnulib-cache.m4 | 14 | ||||
-rw-r--r-- | gl/m4/gnulib-common.m4 | 9 | ||||
-rw-r--r-- | gl/m4/gnulib-comp.m4 | 58 | ||||
-rw-r--r-- | gl/m4/gnulib-tool.m4 | 28 | ||||
-rw-r--r-- | maint.mk | 2 |
7 files changed, 109 insertions, 36 deletions
diff --git a/GNUmakefile b/GNUmakefile index 0c1bc38..7635e8d 100644 --- a/GNUmakefile +++ b/GNUmakefile @@ -55,13 +55,29 @@ _have-git-version-gen := \ ifeq ($(_have-git-version-gen)0,yes$(MAKELEVEL)) _is-dist-target = $(filter-out %clean, \ $(filter maintainer-% dist% alpha beta major,$(MAKECMDGOALS))) - ifneq (,$(_is-dist-target)) - _curr-ver := $(shell cd $(srcdir) && ./$(_build-aux)/git-version-gen \ - $(srcdir)/.tarball-version) + _is-install-target = $(filter-out %check, $(filter install%,$(MAKECMDGOALS))) + ifneq (,$(_is-dist-target)$(_is-install-target)) + _curr-ver := $(shell cd $(srcdir) \ + && $(_build-aux)/git-version-gen .tarball-version) ifneq ($(_curr-ver),$(VERSION)) - $(info INFO: running autoreconf for new version string: $(_curr-ver)) - _dummy := $(shell cd $(srcdir) && rm -rf autom4te.cache .version \ - && $(_autoreconf)) + ifeq ($(_curr-ver),UNKNOWN) + $(info WARNING: unable to verify if $(VERSION) is correct version) + else + ifneq (,$(_is-install-target)) + # GNU Coding Standards state that 'make install' should not cause + # recompilation after 'make all'. But as long as changing the version + # string alters config.h, the cost of having 'make all' always have an + # up-to-date version is prohibitive. So, as a compromise, we merely + # warn when installing a version string that is out of date; the user + # should run 'autoreconf' (or something like 'make distcheck') to + # fix the version, 'make all' to propagate it, then 'make install'. + $(info WARNING: version string $(VERSION) is out of date; run autoreconf -f to fix it) + else + $(info INFO: running autoreconf for new version string: $(_curr-ver)) + _dummy := $(shell cd $(srcdir) && rm -rf autom4te.cache .version \ + && $(_autoreconf)) + endif + endif endif endif endif diff --git a/doc/gendocs_template b/doc/gendocs_template index fca9dcb..164810d 100644 --- a/doc/gendocs_template +++ b/doc/gendocs_template @@ -59,7 +59,7 @@ (%%TEXI_TGZ_SIZE%%K bytes gzipped tar file).</a></li> </ul> -<p>You can <a href="http://www.gnu.org/order/">buy printed copies of +<p>You can <a href="http://shop.fsf.org/">buy printed copies of some manuals</a> (among other items) from the Free Software Foundation; this helps support FSF activities.</p> @@ -81,7 +81,7 @@ script</a>.)</p> <!-- Please make sure the copyright date is consistent with the document --> <!-- and that it is like this "2001, 2002" not this "2001-2002." --> </div><!-- for id="content", starts in the include above --> -<!--#include virtual="/server/footer-min.html" --> +<!--#include virtual="/server/footer.html" --> <div id="footer"> <p> @@ -95,7 +95,7 @@ Please send broken links and other corrections or suggestions to </p> <p> -Copyright © 2007 Free Software Foundation, Inc., +Copyright © 2008 Free Software Foundation, Inc., </p> <address>51 Franklin Street, Fifth Floor, Boston, MA 02111, USA</address> <p>Verbatim copying and distribution of this entire article is diff --git a/gl/m4/gnulib-cache.m4 b/gl/m4/gnulib-cache.m4 index 60b49e7..494b140 100644 --- a/gl/m4/gnulib-cache.m4 +++ b/gl/m4/gnulib-cache.m4 @@ -19,7 +19,19 @@ # Specification in the form of a few gnulib-tool.m4 macro invocations: gl_LOCAL_DIR([gl/override]) -gl_MODULES([fdl gendocs getopt gpl-3.0 lgpl-2.1 maintainer-makefile progname read-file stdint strdup version-etc-fsf]) +gl_MODULES([ + fdl + gendocs + getopt + gpl-3.0 + lgpl-2.1 + maintainer-makefile + progname + read-file + stdint + strdup + version-etc-fsf +]) gl_AVOID([]) gl_SOURCE_BASE([gl]) gl_M4_BASE([gl/m4]) diff --git a/gl/m4/gnulib-common.m4 b/gl/m4/gnulib-common.m4 index 3edfc12..34d91c7 100644 --- a/gl/m4/gnulib-common.m4 +++ b/gl/m4/gnulib-common.m4 @@ -1,4 +1,4 @@ -# gnulib-common.m4 serial 4 +# gnulib-common.m4 serial 5 dnl Copyright (C) 2007-2008 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -31,6 +31,13 @@ AC_DEFUN([gl_MODULE_INDICATOR], [Define to 1 when using the gnulib module ]$1[.]) ]) +# m4_foreach_w +# is a backport of autoconf-2.59c's m4_foreach_w. +# Remove this macro when we can assume autoconf >= 2.60. +m4_ifndef([m4_foreach_w], + [m4_define([m4_foreach_w], + [m4_foreach([$1], m4_split(m4_normalize([$2]), [ ]), [$3])])]) + # AC_PROG_MKDIR_P # is a backport of autoconf-2.60's AC_PROG_MKDIR_P. # Remove this macro when we can assume autoconf >= 2.60. diff --git a/gl/m4/gnulib-comp.m4 b/gl/m4/gnulib-comp.m4 index d446f50..34ca885 100644 --- a/gl/m4/gnulib-comp.m4 +++ b/gl/m4/gnulib-comp.m4 @@ -43,6 +43,8 @@ AC_DEFUN([gl_INIT], m4_pushdef([AC_LIBOBJ], m4_defn([gl_LIBOBJ])) m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gl_REPLACE_FUNCS])) m4_pushdef([AC_LIBSOURCES], m4_defn([gl_LIBSOURCES])) + m4_pushdef([gl_LIBSOURCES_LIST], []) + m4_pushdef([gl_LIBSOURCES_DIR], []) gl_COMMON gl_source_base='gl' gl_GETOPT @@ -71,6 +73,19 @@ AC_DEFUN([gl_INIT], gl_HEADER_STRING_H gl_UNISTD_H gl_WCHAR_H + m4_ifval(gl_LIBSOURCES_LIST, [ + m4_syscmd([test ! -d ]m4_defn([gl_LIBSOURCES_DIR])[ || + for gl_file in ]gl_LIBSOURCES_LIST[ ; do + if test ! -r ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file ; then + echo "missing file ]m4_defn([gl_LIBSOURCES_DIR])[/$gl_file" >&2 + exit 1 + fi + done])dnl + m4_if(m4_sysval, [0], [], + [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])]) + ]) + m4_popdef([gl_LIBSOURCES_DIR]) + m4_popdef([gl_LIBSOURCES_LIST]) m4_popdef([AC_LIBSOURCES]) m4_popdef([AC_REPLACE_FUNCS]) m4_popdef([AC_LIBOBJ]) @@ -93,8 +108,23 @@ AC_DEFUN([gl_INIT], m4_pushdef([AC_LIBOBJ], m4_defn([gltests_LIBOBJ])) m4_pushdef([AC_REPLACE_FUNCS], m4_defn([gltests_REPLACE_FUNCS])) m4_pushdef([AC_LIBSOURCES], m4_defn([gltests_LIBSOURCES])) + m4_pushdef([gltests_LIBSOURCES_LIST], []) + m4_pushdef([gltests_LIBSOURCES_DIR], []) gl_COMMON gl_source_base='tests' + m4_ifval(gltests_LIBSOURCES_LIST, [ + m4_syscmd([test ! -d ]m4_defn([gltests_LIBSOURCES_DIR])[ || + for gl_file in ]gltests_LIBSOURCES_LIST[ ; do + if test ! -r ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file ; then + echo "missing file ]m4_defn([gltests_LIBSOURCES_DIR])[/$gl_file" >&2 + exit 1 + fi + done])dnl + m4_if(m4_sysval, [0], [], + [AC_FATAL([expected source file, required through AC_LIBSOURCES, not found])]) + ]) + m4_popdef([gltests_LIBSOURCES_DIR]) + m4_popdef([gltests_LIBSOURCES_LIST]) m4_popdef([AC_LIBSOURCES]) m4_popdef([AC_REPLACE_FUNCS]) m4_popdef([AC_LIBOBJ]) @@ -121,13 +151,6 @@ AC_DEFUN([gl_LIBOBJ], [ gl_LIBOBJS="$gl_LIBOBJS $1.$ac_objext" ]) -# m4_foreach_w is provided by autoconf-2.59c and later. -# This definition is to accommodate developers using versions -# of autoconf older than that. -m4_ifndef([m4_foreach_w], - [m4_define([m4_foreach_w], - [m4_foreach([$1], m4_split(m4_normalize([$2]), [ ]), [$3])])]) - # Like AC_REPLACE_FUNCS, except that the module name goes # into gl_LIBOBJS instead of into LIBOBJS. AC_DEFUN([gl_REPLACE_FUNCS], [ @@ -136,15 +159,14 @@ AC_DEFUN([gl_REPLACE_FUNCS], [ ]) # Like AC_LIBSOURCES, except the directory where the source file is -# expected is derived from the gnulib-tool parametrization, +# expected is derived from the gnulib-tool parameterization, # and alloca is special cased (for the alloca-opt module). # We could also entirely rely on EXTRA_lib..._SOURCES. AC_DEFUN([gl_LIBSOURCES], [ m4_foreach([_gl_NAME], [$1], [ m4_if(_gl_NAME, [alloca.c], [], [ - m4_syscmd([test -r gl/]_gl_NAME[ || test ! -d gl])dnl - m4_if(m4_sysval, [0], [], - [AC_FATAL([missing gl/]_gl_NAME)]) + m4_define([gl_LIBSOURCES_DIR], [gl]) + m4_append([gl_LIBSOURCES_LIST], _gl_NAME, [ ]) ]) ]) ]) @@ -156,13 +178,6 @@ AC_DEFUN([gltests_LIBOBJ], [ gltests_LIBOBJS="$gltests_LIBOBJS $1.$ac_objext" ]) -# m4_foreach_w is provided by autoconf-2.59c and later. -# This definition is to accommodate developers using versions -# of autoconf older than that. -m4_ifndef([m4_foreach_w], - [m4_define([m4_foreach_w], - [m4_foreach([$1], m4_split(m4_normalize([$2]), [ ]), [$3])])]) - # Like AC_REPLACE_FUNCS, except that the module name goes # into gltests_LIBOBJS instead of into LIBOBJS. AC_DEFUN([gltests_REPLACE_FUNCS], [ @@ -171,15 +186,14 @@ AC_DEFUN([gltests_REPLACE_FUNCS], [ ]) # Like AC_LIBSOURCES, except the directory where the source file is -# expected is derived from the gnulib-tool parametrization, +# expected is derived from the gnulib-tool parameterization, # and alloca is special cased (for the alloca-opt module). # We could also entirely rely on EXTRA_lib..._SOURCES. AC_DEFUN([gltests_LIBSOURCES], [ m4_foreach([_gl_NAME], [$1], [ m4_if(_gl_NAME, [alloca.c], [], [ - m4_syscmd([test -r tests/]_gl_NAME[ || test ! -d tests])dnl - m4_if(m4_sysval, [0], [], - [AC_FATAL([missing tests/]_gl_NAME)]) + m4_define([gltests_LIBSOURCES_DIR], [tests]) + m4_append([gltests_LIBSOURCES_LIST], _gl_NAME, [ ]) ]) ]) ]) diff --git a/gl/m4/gnulib-tool.m4 b/gl/m4/gnulib-tool.m4 index ef59320..4438d48 100644 --- a/gl/m4/gnulib-tool.m4 +++ b/gl/m4/gnulib-tool.m4 @@ -1,4 +1,4 @@ -# gnulib-tool.m4 serial 1 +# gnulib-tool.m4 serial 2 dnl Copyright (C) 2004-2005 Free Software Foundation, Inc. dnl This file is free software; the Free Software Foundation dnl gives unlimited permission to copy and/or distribute it, @@ -8,6 +8,9 @@ dnl The following macros need not be invoked explicitly. dnl Invoking them does nothing except to declare default arguments dnl for "gnulib-tool --import". +dnl Usage: gl_LOCAL_DIR([DIR]) +AC_DEFUN([gl_LOCAL_DIR], []) + dnl Usage: gl_MODULES([module1 module2 ...]) AC_DEFUN([gl_MODULES], []) @@ -20,14 +23,35 @@ AC_DEFUN([gl_SOURCE_BASE], []) dnl Usage: gl_M4_BASE([DIR]) AC_DEFUN([gl_M4_BASE], []) +dnl Usage: gl_PO_BASE([DIR]) +AC_DEFUN([gl_PO_BASE], []) + +dnl Usage: gl_DOC_BASE([DIR]) +AC_DEFUN([gl_DOC_BASE], []) + +dnl Usage: gl_TESTS_BASE([DIR]) +AC_DEFUN([gl_TESTS_BASE], []) + +dnl Usage: gl_WITH_TESTS +AC_DEFUN([gl_WITH_TESTS], []) + dnl Usage: gl_LIB([LIBNAME]) AC_DEFUN([gl_LIB], []) -dnl Usage: gl_LGPL +dnl Usage: gl_LGPL or gl_LGPL([VERSION]) AC_DEFUN([gl_LGPL], []) +dnl Usage: gl_MAKEFILE_NAME([FILENAME]) +AC_DEFUN([gl_MAKEFILE_NAME], []) + dnl Usage: gl_LIBTOOL AC_DEFUN([gl_LIBTOOL], []) dnl Usage: gl_MACRO_PREFIX([PREFIX]) AC_DEFUN([gl_MACRO_PREFIX], []) + +dnl Usage: gl_PO_DOMAIN([DOMAIN]) +AC_DEFUN([gl_PO_DOMAIN], []) + +dnl Usage: gl_VC_FILES([BOOLEAN]) +AC_DEFUN([gl_VC_FILES], []) @@ -20,7 +20,7 @@ ME := maint.mk # List of all C-like source code files that will be tested for -# stylistic "errors". You may want to define this to something +# stylistic "errors". You may want to define this to something # more complex in Makefile.cfg. C_SOURCES ?= $(shell find . -name '*.[chly]') |