]> git.ipfire.org Git - thirdparty/autoconf.git/commitdiff
Pick up some maint.mk improvements from gnulib.
authorEric Blake <eblake@redhat.com>
Fri, 2 Jul 2010 22:31:03 +0000 (16:31 -0600)
committerEric Blake <eblake@redhat.com>
Fri, 2 Jul 2010 22:47:58 +0000 (16:47 -0600)
* configure.ac (AM_INIT_AUTOMAKE): Require 1.11, and build xz
archives by default now.
* maint.mk (gzip_rsyncable): Avoid non-portable echo.
(VC-tag): Depend on gpg_key_ID.
(PREV_VERSION): Don't parse error as version.
(announcement): Populate email addresses with defaults.
(emit_upload_commands, web-manual): Reflect changes in scripts.
(update-NEWS-hash, emit-commit-log, release-prep): New macros.
* cfg.mk (announcement_Cc_, announcement_mail_headers_): Override
defaults.
* HACKING: Modernize a bit.

Signed-off-by: Eric Blake <eblake@redhat.com>
ChangeLog
HACKING
cfg.mk
configure.ac
maint.mk

index 48b944fd29b60db6df7623dc9d01944b376f2037..8c183003444ca644d4b4e505c97b55db0add9648 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,18 @@
 2010-07-02  Eric Blake  <eblake@redhat.com>
 
+       Pick up some maint.mk improvements from gnulib.
+       * configure.ac (AM_INIT_AUTOMAKE): Require 1.11, and build xz
+       archives by default now.
+       * maint.mk (gzip_rsyncable): Avoid non-portable echo.
+       (VC-tag): Depend on gpg_key_ID.
+       (PREV_VERSION): Don't parse error as version.
+       (announcement): Populate email addresses with defaults.
+       (emit_upload_commands, web-manual): Reflect changes in scripts.
+       (update-NEWS-hash, emit-commit-log, release-prep): New macros.
+       * cfg.mk (announcement_Cc_, announcement_mail_headers_): Override
+       defaults.
+       * HACKING: Modernize a bit.
+
        Resync upstream files.
        * GNUmakefile: Run 'make fetch'.
        * build-aux/announce-gen: Likewise.
diff --git a/HACKING b/HACKING
index 42e6a799d0f005f9871d60e0063f1fd18bba24a8..7b5005db837ea40d4b91823fd0b080ec92b5fb91 100644 (file)
--- a/HACKING
+++ b/HACKING
@@ -93,13 +93,11 @@ necessary, but helps.
 
 ** Preparation for release
 Make sure you have GNU make installed.  Make sure your PATH includes a
-released version of Automake (and not a development snapshot);
-preferably 1.10.1 or later so you can build an LZMA tarball.  Make
+Automake 1.11 or later (preferably not a development snapshot).  Make
 sure your locale is sane, e.g. by exporting LC_ALL=C.  Bootstrap the
 checkout, and make sure the testsuite passes.  See above for more
-hints on the testsuite.  Update cfg.mk with details specific to your
-environment, such as your GPG key and the location of a gnulib
-checkout.
+hints on the testsuite.  If needed, update cfg.mk with details
+specific to your environment, such as the location of a gnulib checkout.
 
 ** Update the foreign files
 Running `make fetch' in the top level should grab it all for you; you
@@ -119,18 +117,10 @@ As much as possible, make sure to release an Autoconf that uses
 itself.  That's easy: just be in the top level, and run
 `tests/autoconf'.  Or install this autoconf and run `autoreconf -f'.
 
-** XZ tarball creation
-Using the `dist-xz' option of Automake requires Automake 1.11, and
-fails for everyone who does not have xz installed, but for now
-Autoconf only requires Automake 1.10.  However, as maintainer, you
-should build an xz tarball.  By using Automake 1.11 or newer, you
-can run `make dist-xz'; run this prior to the release target so that
-the release announcement will include the .tar.xz file.
-
 ** Make the release
 Run `make {alpha,beta,stable}' depending on which type of release this
 is.  This runs the various checks, creates delta files, creates a
-preliminary announcement in /tmp/announce-autoconf-<version>, prints
+preliminary announcement in ~/announce-autoconf-<version>, prints
 out the command to upload the files, and updates the previous version
 file.
 
diff --git a/cfg.mk b/cfg.mk
index 4bdf97f948528119c495f2a1bcae329b272c2e6c..6ba0e14e8906581c2670dff4820bb5f5dcf20b5a 100644 (file)
--- a/cfg.mk
+++ b/cfg.mk
@@ -33,6 +33,17 @@ gnulib_dir = '$(abs_srcdir)'/../gnulib
 # The bootstrap tools (override the default).
 bootstrap-tools = automake
 
+# Set preferred lists for announcements.
+
+announcement_Cc_ = $(PACKAGE_BUGREPORT), autotools-announce@gnu.org
+announcement_mail-alpha = autoconf@gnu.org
+announcement_mail-beta = autoconf@gnu.org
+announcement_mail-stable = info-gnu@gnu.org, autoconf@gnu.org
+announcement_mail_headers_ =                                           \
+To: $(announcement_mail-$(RELEASE_TYPE))                               \
+CC: $(announcement_Cc_)                                                        \
+Mail-Followup-To: autoconf@gnu.org
+
 # Update files from gnulib.
 .PHONY: fetch gnulib-update autom4te-update
 fetch: gnulib-update autom4te-update
index 7ef6bf5c108a21fc4361fd84b69ad6d53c220524..5718a240a460239e3db7c122993df390768aab74 100644 (file)
@@ -28,7 +28,8 @@ AC_CONFIG_SRCDIR([ChangeLog])
 
 AC_CONFIG_AUX_DIR([build-aux])
 
-AM_INIT_AUTOMAKE([1.10 dist-bzip2 readme-alpha no-texinfo.tex std-options])
+AM_INIT_AUTOMAKE([1.11 dist-bzip2 dist-xz
+readme-alpha no-texinfo.tex std-options])
 
 # We use `/bin/sh -n script' to check that there are no syntax errors
 # in the scripts.  Although incredible, there are /bin/sh that go into
index 7696c96d971d45e31c9732682dd037a56d530274..43d07591d4b0260d5af2336a3f2f0cd9c5b3ad84 100644 (file)
--- a/maint.mk
+++ b/maint.mk
@@ -28,12 +28,13 @@ build_aux ?= $(srcdir)/build-aux
 # Do not save the original name or timestamp in the .tar.gz file.
 # Use --rsyncable if available.
 gzip_rsyncable := \
-  $(shell gzip --help 2>/dev/null|grep rsyncable >/dev/null && echo --rsyncable)
+  $(shell gzip --help 2>/dev/null|grep rsyncable >/dev/null \
+    && printf %s --rsyncable)
 GZIP_ENV = '--no-name --best $(gzip_rsyncable)'
 
 GIT = git
 VC = $(GIT)
-VC-tag = git tag -s -m '$(VERSION)'
+VC-tag = git tag -s -m '$(VERSION)' -u '$(gpg_key_ID)'
 
 VC_LIST = $(build_aux)/vc-list-files -C $(srcdir)
 
@@ -48,7 +49,7 @@ ifeq ($(origin prev_version_file), undefined)
   prev_version_file = $(srcdir)/.prev-version
 endif
 
-PREV_VERSION := $(shell cat $(prev_version_file))
+PREV_VERSION := $(shell cat $(prev_version_file) 2>/dev/null)
 VERSION_REGEXP = $(subst .,\.,$(VERSION))
 
 this-vc-tag = v$(VERSION)
@@ -382,6 +383,19 @@ strftime-check:
 check-AUTHORS:
        test ! -d src || $(MAKE) -C src $@
 
+# Ensure that we don't accidentally insert an entry into an old NEWS block.
+sc_immutable_NEWS:
+       @if test -f $(srcdir)/NEWS; then                                \
+         test "$(NEWS_hash)" = '$(old_NEWS_hash)' && : ||              \
+           { echo '$(ME): you have modified old NEWS' 1>&2; exit 1; }; \
+       fi
+
+# Update the hash stored above.  Do this after each release and
+# for any corrections to old entries.
+update-NEWS-hash: NEWS
+       perl -pi -e 's/^(old_NEWS_hash[ \t]+:?=[ \t]+).*/$${1}'"$(NEWS_hash)/" \
+         $(srcdir)/cfg.mk
+
 # Ensure that we use only the standard $(VAR) notation,
 # not @...@ in Makefile.am, now that we can rely on automake
 # to emit a definition for each substituted variable.
@@ -465,9 +479,8 @@ writable-files:
        if test -d $(release_archive_dir); then :; else                 \
          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              \
+       for file in $(distdir).tar.gz                                   \
+                   $(release_archive_dir)/$(distdir).tar.gz; do        \
          test -e $$file || continue;                                   \
          test -w $$file                                                \
            || { echo ERROR: $$file is not writable; fail=1; };         \
@@ -558,8 +571,16 @@ gpg_key_ID ?= \
      && gpgv .ann-sig - < /dev/null 2>&1 \
          | sed -n '/.*key ID \([0-9A-F]*\)/s//\1/p'; rm -f .ann-sig)
 
+translation_project_ ?= coordinator@translationproject.org
+announcement_Cc_ ?= $(translation_project_), $(PACKAGE_BUGREPORT)
+announcement_mail_headers_ ?=                                          \
+To: info-gnu@gnu.org                                                   \
+Cc: $(announcement_Cc_)                                                        \
+Mail-Followup-To: $(PACKAGE_BUGREPORT)
+
 announcement: NEWS ChangeLog $(rel-files)
-       @$(build_aux)/announce_gen                                      \
+       @$(build_aux)/announce-gen                                      \
+           --mail-headers='$(announcement_mail_headers_)'              \
            --release-type=$(RELEASE_TYPE)                              \
            --package=$(PACKAGE)                                        \
            --prev=$(PREV_VERSION)                                      \
@@ -567,7 +588,6 @@ announcement: NEWS ChangeLog $(rel-files)
            --gpg-key-id=$(gpg_key_ID)                                  \
            --news=$(srcdir)/NEWS                                       \
            --bootstrap-tools=$(bootstrap-tools)                        \
-           --gnulib-version=$(gnulib-version)                          \
            --no-print-checksums                                        \
            $(addprefix --url-dir=, $(url_dir_list))
 
@@ -581,40 +601,69 @@ www-gnu = http://www.gnu.org
 # Use mv, if you don't have/want move-if-change.
 move_if_change ?= move-if-change
 
+upload_dest_dir_ ?= $(PACKAGE)
+
 emit_upload_commands:
        @echo =====================================
        @echo =====================================
        @echo "$(build_aux)/gnupload $(GNUPLOADFLAGS) \\"
-       @echo "    --to $(gnu_rel_host):$(PACKAGE) \\"
+       @echo "    --to $(gnu_rel_host):$(upload_dest_dir_) \\"
        @echo "  $(rel-files)"
-       @echo '# send the /tmp/announcement e-mail'
+       @echo '# send the ~/announce-$(my_distdir) e-mail'
        @echo =====================================
        @echo =====================================
 
+noteworthy = * Noteworthy changes in release ?.? (????-??-??) [?]
+define emit-commit-log
+  printf '%s\n' 'post-release administrivia' '' \
+    '* NEWS: Add header line for next release.' \
+    '* .prev-version: Record previous version.' \
+    '* cfg.mk (old_NEWS_hash): Auto-update.'
+endef
+
 .PHONY: alpha beta stable
+ALL_RECURSIVE_TARGETS += alpha beta stable
 alpha beta stable: news-date-check changelog-check $(local-check)
        test $@ = stable                                                \
-         && { echo $(VERSION) | grep -E '^[0-9]+(\.[0-9]+)+$$' \
+         && { echo $(VERSION) | grep -E '^[0-9]+(\.[0-9]+)+$$'         \
               || { echo "invalid version string: $(VERSION)" 1>&2; exit 1;};}\
          || :
        $(MAKE) vc-dist
-       $(MAKE) $(xd-delta)
-       $(MAKE) -s announcement RELEASE_TYPE=$@ > /tmp/announce-$(my_distdir)
-       ln $(rel-files) $(release_archive_dir)
-       chmod a-w $(rel-files)
+       $(MAKE) dist XZ_OPT=-9ev
+       $(MAKE) $(release-prep-hook) RELEASE_TYPE=$@
        $(MAKE) -s emit_upload_commands RELEASE_TYPE=$@
+
+# Override this in cfg.mk if you follow different procedures.
+release-prep-hook ?= release-prep
+
+.PHONY: release-prep
+release-prep:
+       case $$RELEASE_TYPE in alpha|beta|stable) ;; \
+         *) echo "invalid RELEASE_TYPE: $$RELEASE_TYPE" 1>&2; exit 1;; esac
+       $(MAKE) -s announcement > ~/announce-$(my_distdir)
+       if test -d $(release_archive_dir); then                 \
+         ln $(rel-files) $(release_archive_dir);               \
+         chmod a-w $(rel-files);                               \
+       fi
        echo $(VERSION) > $(prev_version_file)
-       $(VC) commit -m \
-         '$(prev_version_file): Record previous version: $(VERSION).' \
-         $(prev_version_file)
+       $(MAKE) update-NEWS-hash
+       perl -pi -e '$$. == 3 and print "$(noteworthy)\n\n\n"' NEWS
+       $(emit-commit-log) > .ci-msg
+       $(VC) commit -F .ci-msg -a
+       rm .ci-msg
+
 
+# Override this with e.g., -s $(srcdir)/some_other_name.texi
+# if the default $(PACKAGE)-derived name doesn't apply.
+gendocs_options_ ?=
 
 .PHONY: web-manual
 web-manual:
        @test -z "$(manual_title)" \
          && { echo define manual_title in cfg.mk 1>&2; exit 1; } || :
        @cd '$(srcdir)/doc'; \
-         $(SHELL) ../build-aux/gendocs.sh -o '$(abs_builddir)/doc/manual' \
+         $(SHELL) ../build-aux/gendocs.sh $(gendocs_options_) \
+            -o '$(abs_builddir)/doc/manual' \
             --email $(PACKAGE_BUGREPORT) $(PACKAGE) \
            "$(PACKAGE_NAME) - $(manual_title)"
        @echo " *** Upload the doc/manual directory to web-cvs."