]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Pull in recent maintainer improvements from coreutils.
authorEric Blake <ebb9@byu.net>
Tue, 4 Mar 2008 22:26:02 +0000 (15:26 -0700)
committerEric Blake <ebb9@byu.net>
Tue, 4 Mar 2008 22:38:26 +0000 (15:38 -0700)
* GNUmakefile (_is-dist-target): 'make distclean' should not
trigger autoreconf.
(_dummy): Change directories before removing autom4te.cache.
(check dist distcheck install) [!_have-Makefile]: Provide nicer
diagnostics.
* configure.ac (AC_CONFIG_LINKS): Copy GNUmakefile into VPATH
builds, after initial bootstrap.
* Makefile.am (distclean-local): Work around current automake bug.
* Makefile.maint (ME): Allow VPATH usage.

Signed-off-by: Eric Blake <ebb9@byu.net>
ChangeLog
GNUmakefile
Makefile.am
Makefile.maint
configure.ac

index 3ebb0059437d52535581d66db3de48afbba8bb4a..2a73baa8289e837d44b8f970f439916529c06e68 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
 2008-03-04  Eric Blake  <ebb9@byu.net>
 
+       Pull in recent maintainer improvements from coreutils.
+       * GNUmakefile (_is-dist-target): 'make distclean' should not
+       trigger autoreconf.
+       (_dummy): Change directories before removing autom4te.cache.
+       (check dist distcheck install) [!_have-Makefile]: Provide nicer
+       diagnostics.
+       * configure.ac (AC_CONFIG_LINKS): Copy GNUmakefile into VPATH
+       builds, after initial bootstrap.
+       * Makefile.am (distclean-local): Work around current automake bug.
+       * Makefile.maint (ME): Allow VPATH usage.
+
        Use git-merge-changelog when available.
        * .gitattributes: New file.
        * README-hacking: Document use of git-merge-changelog.
index e6444b68567ba28126e6537d035bedc20df397db..e22015b86794910492b597f7c0a2d5c853b28acf 100644 (file)
@@ -47,15 +47,17 @@ include Makefile
 # for others: rerunning autoconf and recompiling everything isn't cheap.
 # Remove the autoreconf-provided INSTALL, so that we regenerate it.
 ifeq (0,$(MAKELEVEL))
-  _is-dist-target = $(filter dist% alpha beta major,$(MAKECMDGOALS))
+  _is-dist-target = $(filter-out %clean, \
+    $(filter dist% alpha beta major,$(MAKECMDGOALS)))
   ifneq (,$(_is-dist-target))
     _curr-ver := $(shell cd $(srcdir) && ./build-aux/git-version-gen \
                    $(srcdir)/.tarball-version)
     ifneq ($(_curr-ver),$(VERSION))
       $(info INFO: running autoreconf for new version string: $(_curr-ver))
       _dummy := $(shell                                \
-       rm -rf autom4te.cache;                  \
-       (cd $(srcdir) && autoreconf -i -v)      \
+       cd $(srcdir)                            \
+         && rm -rf autom4te.cache              \
+         && autoreconf -i -v                   \
          && rm -f INSTALL)
     endif
   endif
@@ -71,6 +73,8 @@ all:
        @echo "You must run ./configure before running \`make'." 1>&2
        @exit 1
 
+check dist distcheck install: all
+
 endif
 
 # Tell version 3.79 and up of GNU make to not build goals in this
index fb086518116277ee9bda4fafed546b60b10b464f..57e750947ed1fff4272c0caf5ea5d3e43a83769d 100644 (file)
@@ -92,3 +92,8 @@ autom4te-update:
 # never in a checked-out repository.
 dist-hook:
        echo $(VERSION) > $(distdir)/.tarball-version
+
+# Arrange to remove the symlink to GNUmakefile in VPATH builds.
+# TODO remove this once automake vs. AC_CONFIG_LINKS issue is fixed.
+distclean-local:
+       if test x"$(VPATH)" != x ; then rm -f GNUmakefile ; fi
index 3a4fe7a0bd73d9e9aae8e52a942cdb1b9a007451..71bb6b2231e3c99e189ca7dda419e1f475556eec 100644 (file)
@@ -2,7 +2,7 @@
 # This Makefile fragment is shared between the coreutils,
 # CPPI, Bison, and Autoconf.
 
-# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006 Free Software
+# Copyright (C) 2001, 2002, 2003, 2004, 2005, 2006, 2008 Free Software
 # Foundation, Inc.
 #
 # This program is free software: you can redistribute it and/or modify
@@ -20,7 +20,7 @@
 
 # This is reported not to work with make-3.79.1
 # ME := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
-ME := Makefile.maint
+ME := $(srcdir)/Makefile.maint
 
 # Do not save the original name or timestamp in the .tar.gz file.
 # Use --rsyncable if available.
@@ -391,8 +391,8 @@ writable-files:
          mkdir $(release_archive_dir);                                 \
        fi
        for file in $(distdir).tar.gz $(xd-delta)                       \
-                   $(release_archive_dir)/$(distdir).tar.gz            \
-                   $(release_archive_dir)/$(xd-delta); do              \
+                   $(release_archive_dir)/$(distdir).tar.gz            \
+                   $(release_archive_dir)/$(xd-delta); do              \
          test -e $$file || continue;                                   \
          test -w $$file                                                \
            || { echo ERROR: $$file is not writable; fail=1; };         \
index 99ba100c97f9e92e2eab1448e028e7aea214a27a..13e48ab7f49c5eded507b54733630b140e08236b 100644 (file)
@@ -152,6 +152,20 @@ AC_PROG_SED
 ## Conclusion.  ##
 ## ------------ ##
 
+dnl Allow maintainer rules under GNU make even in VPATH builds.  This does
+dnl not work in autoconf 2.61 or earlier, but we don't want to require
+dnl unreleased autoconf during bootstrap, hence the version test.
+dnl TODO remove the version check once we depend on autoconf 2.62.
+dnl Meanwhile, we must use a shell variable so that we bypass automake's
+dnl attempts to remove the sole copy of GNUmakefile in a non-VPATH build
+dnl during 'make distclean'.
+dnl TODO avoid the shell variable once automake is fixed.
+GNUmakefile=GNUmakefile
+m4_if(m4_version_compare([2.61a.100],
+       m4_defn([m4_PACKAGE_VERSION])), [1], [],
+      [AC_CONFIG_LINKS([$GNUmakefile:$GNUmakefile], [],
+       [GNUmakefile=$GNUmakefile])])
+
 AC_CONFIG_FILES([Makefile doc/Makefile
                 lib/Makefile lib/Autom4te/Makefile lib/autoscan/Makefile
                 lib/m4sugar/Makefile