]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Sync GNUmakefile with gnulib.
authorEric Blake <ebb9@byu.net>
Thu, 20 Mar 2008 13:18:23 +0000 (07:18 -0600)
committerEric Blake <ebb9@byu.net>
Thu, 20 Mar 2008 13:18:23 +0000 (07:18 -0600)
* GNUmakefile (Makefile.cfg): Rename...
(cfg.mk): ...to this, and make optional.
(GNUmakefile.cfg): Delete, redundant with cfg.mk.
(Makefile.maint): Rename...
(maint.mk): ...to this.
(all) [!_have-Makefile]: Rename...
(abort-due-to-no-makefile): ...to this, and invoke via
.DEFAULT_GOAL to pick up all targets.
* Makefile.cfg: Rename...
* cfg.mk: ...to this.
* Makefile.maint: Rename...
* maint.mk ...to this.
(ME): Reflect name change.
(makefile-check, m4-check, author_mark_check, msg): Use $(ME)
rather than hard-coded name.
* GNUmakefile.cfg: Delete; move rules into cfg.mk.
* Makefile.am (EXTRA_DIST): Reflect file name changes.
* .x-sc_prohibit_atoi_atof: Likewise.
* lib/freeze.mk: Likewise.

Signed-off-by: Eric Blake <ebb9@byu.net>
.x-sc_prohibit_atoi_atof
ChangeLog
GNUmakefile
Makefile.am
cfg.mk [moved from Makefile.cfg with 80% similarity]
lib/freeze.mk
maint.mk [moved from Makefile.maint with 98% similarity]

index 7f46b6ed6a240647cca6ed32780841ba27772395..4d68f470b0e790aa5d6d3419dc2b3db0ebf3c80e 100644 (file)
@@ -1,3 +1,3 @@
 ChangeLog
-Makefile.maint
+maint.mk
 doc/autoconf.texi
index 6815dad42f0fe4f669c9ce25adbed10d3e35f60d..8c653f83a03ca2569fcb657608d10f5c04aeed48 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,26 @@
+2008-03-20  Eric Blake  <ebb9@byu.net>
+
+       Sync GNUmakefile with gnulib.
+       * GNUmakefile (Makefile.cfg): Rename...
+       (cfg.mk): ...to this, and make optional.
+       (GNUmakefile.cfg): Delete, redundant with cfg.mk.
+       (Makefile.maint): Rename...
+       (maint.mk): ...to this.
+       (all) [!_have-Makefile]: Rename...
+       (abort-due-to-no-makefile): ...to this, and invoke via
+       .DEFAULT_GOAL to pick up all targets.
+       * Makefile.cfg: Rename...
+       * cfg.mk: ...to this.
+       * Makefile.maint: Rename...
+       * maint.mk ...to this.
+       (ME): Reflect name change.
+       (makefile-check, m4-check, author_mark_check, msg): Use $(ME)
+       rather than hard-coded name.
+       * GNUmakefile.cfg: Delete; move rules into cfg.mk.
+       * Makefile.am (EXTRA_DIST): Reflect file name changes.
+       * .x-sc_prohibit_atoi_atof: Likewise.
+       * lib/freeze.mk: Likewise.
+
 2008-03-19  Stepan Kasal  <kasal@ucw.cz>
 
        * doc/autoconf.texi (Introduction): Improve the paraphrase of
index 8bbd6c8fce65397dd57ae6d7cb1f6ca0d6d83a26..fac11d3d02c61c61b1704a63963ad86fbfc62d09 100644 (file)
@@ -1,11 +1,12 @@
 # Having a separate GNUmakefile lets me `include' the dynamically
-# generated rules created via Makefile.maint as well as Makefile.maint itself.
+# generated rules created via cfg.mk (package-local configuration)
+# as well as maint.mk (generic maintainer rules).
 # This makefile is used only if you run GNU Make.
 # It is necessary if you want to build targets usually of interest
 # only to the maintainer.
 
 # Copyright (C) 2001, 2003, 2006-2008 Free Software Foundation, Inc.
-#
+
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # the Free Software Foundation, either version 3 of the License, or
@@ -29,10 +30,9 @@ else
 SHELL = sh
 endif
 
-_have-Makefile := $(shell test -f Makefile && echo yes)
-
 # If the user runs GNU make but has not yet run ./configure,
 # give them a diagnostic.
+_have-Makefile := $(shell test -f Makefile && echo yes)
 ifeq ($(_have-Makefile),yes)
 
 # Make tar archive easier to reproduce.
@@ -41,7 +41,8 @@ export TAR_OPTIONS = --owner=0 --group=0 --numeric-owner
 include Makefile
 
 # Some projects override e.g., _autoreconf here.
--include $(srcdir)/GNUmakefile.cfg
+-include $(srcdir)/cfg.mk
+include $(srcdir)/maint.mk
 
 _autoreconf ?= autoreconf
 
@@ -60,18 +61,19 @@ ifeq (0,$(MAKELEVEL))
   endif
 endif
 
-include $(srcdir)/Makefile.cfg
-include $(srcdir)/Makefile.maint
-
 else
 
-all:
+.DEFAULT_GOAL := abort-due-to-no-makefile
+
+# The package can override .DEFAULT_GOAL to run actions like autoreconf.
+-include ./cfg.mk
+include ./maint.mk
+
+abort-due-to-no-makefile:
        @echo There seems to be no Makefile in this directory.   1>&2
        @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 9abb7ca6f0f8db5a1b1635288649a8803ded3f8f..40cb20c3d4b1ada1b8db5b971391f23146ca8c53 100644 (file)
@@ -25,8 +25,7 @@ ACLOCAL_AMFLAGS = -I m4
 
 EXTRA_DIST = ChangeLog.0 ChangeLog.1 ChangeLog.2 \
             BUGS \
-            GNUmakefile GNUmakefile.cfg \
-            Makefile.maint Makefile.cfg \
+            GNUmakefile maint.mk cfg.mk \
             build-aux/git-version-gen \
             config/announce-gen config/prev-version.txt
 
similarity index 80%
rename from Makefile.cfg
rename to cfg.mk
index 7164e3be48b45e192b65a472f0f3b136d6b4b519..2b0bcac4bfc4a1547d8f364098aad46f2177e6d6 100644 (file)
+++ b/cfg.mk
@@ -1,5 +1,5 @@
-# Customize Makefile.maint for Autoconf.            -*- Makefile -*-
-# Copyright (C) 2003, 2004, 2006 Free Software Foundation, Inc.
+# Customize maint.mk for Autoconf.            -*- Makefile -*-
+# Copyright (C) 2003, 2004, 2006, 2008 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
 # You should have received a copy of the GNU General Public License
 # along with this program.  If not, see <http://www.gnu.org/licenses/>.
 
+# 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
+
+# Version management.
 prev_version_file = $(srcdir)/config/prev-version.txt
 announce_gen   = $(srcdir)/config/announce-gen
 release_archive_dir = releases
index d289b183adc2bb62b464704d654d06ecace99576..0903c9a8a1467be898f312648befae346b89b2ea 100644 (file)
@@ -1,6 +1,6 @@
 # Freeze M4 files.
 
-# Copyright (C) 2002, 2004, 2006, 2007 Free Software Foundation, Inc.
+# Copyright (C) 2002, 2004, 2006, 2007, 2008 Free Software Foundation, Inc.
 
 # This program is free software: you can redistribute it and/or modify
 # it under the terms of the GNU General Public License as published by
@@ -26,7 +26,7 @@ AUTOM4TE_CFG = $(top_builddir)/lib/autom4te.cfg
 $(AUTOM4TE_CFG): $(top_srcdir)/lib/autom4te.in
        cd $(top_builddir)/lib && $(MAKE) $(AM_MAKEFLAGS) autom4te.cfg
 
-# Do not use AUTOM4TE here, since Makefile.maint (my-distcheck)
+# Do not use AUTOM4TE here, since maint.mk (my-distcheck)
 # checks if we are independent of Autoconf by defining AUTOM4TE (and
 # others) to `false'.  Autoconf provides autom4te, so that doesn't
 # apply to us.
similarity index 98%
rename from Makefile.maint
rename to maint.mk
index 71bb6b2231e3c99e189ca7dda419e1f475556eec..0e22d3e6d5ea4bc844183920a08b1a2a557b562d 100644 (file)
+++ b/maint.mk
@@ -20,7 +20,7 @@
 
 # This is reported not to work with make-3.79.1
 # ME := $(word $(words $(MAKEFILE_LIST)),$(MAKEFILE_LIST))
-ME := $(srcdir)/Makefile.maint
+ME := $(srcdir)/maint.mk
 
 # Do not save the original name or timestamp in the .tar.gz file.
 # Use --rsyncable if available.
@@ -316,7 +316,7 @@ check-AUTHORS:
 # to emit a definition for each substituted variable.
 makefile-check:
        grep -nE '@[A-Z_0-9]+@' `find . -name Makefile.am` \
-         && { echo 'Makefile.maint: use $$(...), not @...@' 1>&2; exit 1; } || :
+         && { echo '$(ME): use $$(...), not @...@' 1>&2; exit 1; } || :
 
 news-date-check: NEWS
        today=`date +%Y-%m-%d`; \
@@ -340,7 +340,7 @@ changelog-check:
 m4-check:
        @shopt -s nullglob;                                             \
        grep 'AC_DEFUN([^[]' m4/*.m4 /dev/null                          \
-         && { echo 'Makefile.maint: quote the first arg to AC_DEFUN' 1>&2; \
+         && { echo '$(ME): quote the first arg to AC_DEFUN' 1>&2; \
               exit 1; } || :
 
 # Verify that all source files using _() are listed in po/POTFILES.in.
@@ -371,7 +371,7 @@ po-check:
 # gettext recognizes it as a string requiring translation.
 author_mark_check:
        @grep -n '^# *define AUTHORS "[^"]* and ' src/*.c |grep -v ' N_ (' && \
-         { echo 'Makefile.maint: enclose the above strings in N_ (...)' 1>&2; \
+         { echo '$(ME): enclose the above strings in N_ (...)' 1>&2; \
            exit 1; } || :
 
 # Sometimes it is useful to change the PATH environment variable
@@ -380,7 +380,7 @@ author_mark_check:
 # It'd be better to use `find -print0 ...|xargs -0 ...', but less portable,
 # and there probably aren't many projects with so many Makefile.am files
 # that we'd have to worry about limits on command line length.
-msg = 'Makefile.maint: Do not use `:'\'' above; use @PATH_SEPARATOR@ instead'
+msg = '$(ME): Do not use `:'\'' above; use @PATH_SEPARATOR@ instead'
 makefile_path_separator_check:
        @grep -n 'PATH=.*:' `find $(srcdir) -name Makefile.am` \
          && { echo $(msg) 1>&2; exit 1; } || :