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.
# 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
@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
# 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
# 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
# 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.
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; }; \
## 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