[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
maintainer improvements
From: |
Eric Blake |
Subject: |
maintainer improvements |
Date: |
Tue, 4 Mar 2008 22:40:24 +0000 (UTC) |
User-agent: |
Loom/3.14 (http://gmane.org/) |
For all of you who like VPATH builds with GNU make: I'm installing this (I was
able to do 'make dist' in a VPATH tree). Makefile.maint is still quite out-of-
sync from coreutils, but at least this is progress in other files.
From: Eric Blake <address@hidden>
Date: Tue, 4 Mar 2008 15:26:02 -0700
Subject: [PATCH] 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.
Signed-off-by: Eric Blake <address@hidden>
---
ChangeLog | 11 +++++++++++
GNUmakefile | 10 +++++++---
Makefile.am | 5 +++++
Makefile.maint | 8 ++++----
configure.ac | 14 ++++++++++++++
5 files changed, 41 insertions(+), 7 deletions(-)
diff --git a/ChangeLog b/ChangeLog
index 3ebb005..2a73baa 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,16 @@
2008-03-04 Eric Blake <address@hidden>
+ 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.
diff --git a/GNUmakefile b/GNUmakefile
index e6444b6..e22015b 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -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
diff --git a/Makefile.am b/Makefile.am
index fb08651..57e7509 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -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
diff --git a/Makefile.maint b/Makefile.maint
index 3a4fe7a..71bb6b2 100644
--- a/Makefile.maint
+++ b/Makefile.maint
@@ -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; }; \
diff --git a/configure.ac b/configure.ac
index 99ba100..13e48ab 100644
--- a/configure.ac
+++ b/configure.ac
@@ -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
--
1.5.4
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- maintainer improvements,
Eric Blake <=