[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[PATCH] Generalize GNUmakefile, ...
From: |
Jim Meyering |
Subject: |
[PATCH] Generalize GNUmakefile, ... |
Date: |
Wed, 12 Mar 2008 12:39:50 +0100 |
Hi,
I'm planing to make the following change in coreutils
so that autoconf can then use the exact same GNUmakefile.
The only difference for autoconf would be that it would
also require a new file, GNUmakefile.cfg, with this content:
----------------------
# Build with our own versions of these tools, when possible.
export PATH = $(shell echo "`pwd`/tests:$$PATH")
# Remove the autoreconf-provided INSTALL, so that we regenerate it.
_autoreconf = autoreconf -i -v && rm -f INSTALL
----------------------
Thus, for autoconf, making this change would induce no functional difference.
(for coreutils, it also fixes a tiny bug: it would fail to remove
$(srcdir)/autom4te.cache in VPATH builds)
I'll send an autoconf patch separately.
Here's the coreutils change:
===============================================================
Generalize GNUmakefile, ...
...so that it can be used unmodified by autoconf.
* GNUmakefile: Include optional file, GNUmakefile.cfg.
Autoconf will use this to override _autoreconf and to export PATH.
(_autoreconf): Define.
(_dummy): cd to $(srcdir) before removing autom4te.cache.
Signed-off-by: Jim Meyering <address@hidden>
---
GNUmakefile | 9 ++++++---
1 files changed, 6 insertions(+), 3 deletions(-)
diff --git a/GNUmakefile b/GNUmakefile
index 719cfad..9404222 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -38,12 +38,15 @@ ifeq ($(_have-Makefile),yes)
# Make tar archive easier to reproduce.
export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner
+# Some projects override e.g., _autoreconf here.
+-include GNUmakefile.cfg
+
include Makefile
-_curr-ver := $(VERSION)
+_autoreconf ?= autoreconf
# Ensure that $(VERSION) is up to date for dist-related targets, but not
-# for others: running autoreconf and recompiling everything isn't cheap.
+# for others: rerunning autoreconf and recompiling everything isn't cheap.
ifeq (0,$(MAKELEVEL))
_is-dist-target = $(filter-out %clean, \
$(filter dist% alpha beta major,$(MAKECMDGOALS)))
@@ -52,7 +55,7 @@ ifeq (0,$(MAKELEVEL))
$(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))
+ _dummy := $(shell cd $(srcdir) && rm -rf autom4te.cache &&
$(_autoreconf)))
endif
endif
endif
--
1.5.4.4.482.g5f904
- [PATCH] Generalize GNUmakefile, ...,
Jim Meyering <=
- Re: [PATCH] Generalize GNUmakefile, ..., Jim Meyering, 2008/03/12
- Re: [PATCH] Generalize GNUmakefile, ..., Eric Blake, 2008/03/12
- Re: [PATCH] Generalize GNUmakefile, ..., Paul Eggert, 2008/03/13
- Re: [PATCH] Generalize GNUmakefile, ..., Jim Meyering, 2008/03/13
- Re: [PATCH] Generalize GNUmakefile, ..., Eric Blake, 2008/03/20
- Re: [PATCH] Generalize GNUmakefile, ..., Eric Blake, 2008/03/20
- Re: [PATCH] Generalize GNUmakefile, ..., Jim Meyering, 2008/03/20
- Re: [PATCH] Generalize GNUmakefile, ..., Ralf Wildenhues, 2008/03/20