autoconf-patches
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [PATCH] Generalize GNUmakefile, ...


From: Jim Meyering
Subject: Re: [PATCH] Generalize GNUmakefile, ...
Date: Wed, 12 Mar 2008 13:20:09 +0100

Jim Meyering <address@hidden> wrote:
> 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 it is:
(NB: here I've changed the -include line to specify
"$(srcdir)/GNUmakefile.cfg", for VPATH builds)

        Use a more general GNUmakefile.
        * GNUmakefile: Sync from coreutils.
        * Makefile.am (EXTRA_DIST): Add GNUmakefile.cfg.
        * GNUmakefile.cfg: New file.

Signed-off-by: Jim Meyering <address@hidden>
---
 GNUmakefile     |   15 ++++++---------
 GNUmakefile.cfg |    7 +++++++
 Makefile.am     |    3 ++-
 3 files changed, 15 insertions(+), 10 deletions(-)
 create mode 100644 GNUmakefile.cfg

diff --git a/GNUmakefile b/GNUmakefile
index e22015b..3ea4cf8 100644
--- a/GNUmakefile
+++ b/GNUmakefile
@@ -38,14 +38,15 @@ ifeq ($(_have-Makefile),yes)
 # Make tar archive easier to reproduce.
 export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner

-# Build with our own versions of these tools, when possible.
-export PATH = $(shell echo "`pwd`/tests:$$PATH")
+# Some projects override e.g., _autoreconf here.
+-include $(srcdir)/GNUmakefile.cfg

 include Makefile

+_autoreconf ?= autoreconf
+
 # Ensure that $(VERSION) is up to date for dist-related targets, but not
-# for others: rerunning autoconf and recompiling everything isn't cheap.
-# Remove the autoreconf-provided INSTALL, so that we regenerate it.
+# 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)))
@@ -54,11 +55,7 @@ ifeq (0,$(MAKELEVEL))
                    $(srcdir)/.tarball-version)
     ifneq ($(_curr-ver),$(VERSION))
       $(info INFO: running autoreconf for new version string: $(_curr-ver))
-      _dummy := $(shell                                \
-       cd $(srcdir)                            \
-         && rm -rf autom4te.cache              \
-         && autoreconf -i -v                   \
-         && rm -f INSTALL)
+      _dummy := $(shell cd $(srcdir) && rm -rf autom4te.cache && 
$(_autoreconf)))
     endif
   endif
 endif
diff --git a/GNUmakefile.cfg b/GNUmakefile.cfg
new file mode 100644
index 0000000..be213f4
--- /dev/null
+++ b/GNUmakefile.cfg
@@ -0,0 +1,7 @@
+# This file is '-include'd into GNUmakefile.
+
+# 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
diff --git a/Makefile.am b/Makefile.am
index 57e7509..d2eed2e 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -25,7 +25,8 @@ ACLOCAL_AMFLAGS = -I m4

 EXTRA_DIST = ChangeLog.0 ChangeLog.1 ChangeLog.2 \
             BUGS \
-            GNUmakefile Makefile.maint Makefile.cfg \
+            GNUmakefile GNUmakefile.cfg
+            Makefile.maint Makefile.cfg \
             build-aux/git-version-gen \
             config/announce-gen config/prev-version.txt

--
1.5.4.4.482.g5f904




reply via email to

[Prev in Thread] Current Thread [Next in Thread]