X-Git-Url: http://erislabs.net/gitweb/?a=blobdiff_plain;f=top%2Fmaint.mk;h=2bdf1eb848998e2654fd57a2b4d8315be93bfa77;hb=e7100ae48702b41167615d0dba263125114216ef;hp=596da386d925100171153563620c765cfc225fad;hpb=875fb2d6773114a51fbb4cea4580233b3355f47d;p=gnulib.git diff --git a/top/maint.mk b/top/maint.mk index 596da386d..2bdf1eb84 100644 --- a/top/maint.mk +++ b/top/maint.mk @@ -2,7 +2,7 @@ # This Makefile fragment tries to be general-purpose enough to be # used by many projects via the gnulib maintainer-makefile module. -## Copyright (C) 2001-2009 Free Software Foundation, Inc. +## Copyright (C) 2001-2010 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 @@ -30,7 +30,6 @@ gzip_rsyncable := \ $(shell gzip --help 2>/dev/null|grep rsyncable >/dev/null && echo --rsyncable) GZIP_ENV = '--no-name --best $(gzip_rsyncable)' -# cfg.mk must define the gpg_key_ID used by this package. GIT = git VC = $(GIT) VC-tag = git tag -s -m '$(VERSION)' -u '$(gpg_key_ID)' @@ -80,7 +79,7 @@ endif # Override this in cfg.mk if you are using a different format in your # NEWS file. today = $(shell date +%Y-%m-%d) -news-check-regexp ?= '^\*.* $(VERSION_REGEXP) ($(today))' +news-check-regexp ?= '^\*.* $(VERSION_REGEXP) \($(today)\)' # Prevent programs like 'sort' from considering distinct strings to be equal. # Doing it here saves us from having to set LC_ALL elsewhere in this file. @@ -682,23 +681,19 @@ vc-diff-check: rm vc-diffs; \ fi -# Use this to make sure we don't run these programs when building -# from a virgin tgz file, below. -null_AM_MAKEFLAGS = \ - ACLOCAL=false \ - AUTOCONF=false \ - AUTOMAKE=false \ - AUTOHEADER=false \ - MAKEINFO=false - -built_programs = $$(cd src && MAKEFLAGS= $(MAKE) -s built_programs.list) - rel-files = $(DIST_ARCHIVES) gnulib_dir ?= $(srcdir)/gnulib gnulib-version = $$(cd $(gnulib_dir) && git describe) bootstrap-tools ?= autoconf,automake,gnulib +# If it's not already specified, derive the GPG key ID from +# the signed tag we've just applied to mark this release. +gpg_key_ID ?= \ + $$(git cat-file tag v$(VERSION) > .ann-sig \ + && gpgv .ann-sig - < /dev/null 2>&1 \ + | sed -n '/.*key ID \([0-9A-F]*\)/s//\1/p'; rm -f .ann-sig) + announcement: NEWS ChangeLog $(rel-files) @$(build_aux)/announce-gen \ --release-type=$(RELEASE_TYPE) \ @@ -725,7 +720,7 @@ emit_upload_commands: @echo "$(build_aux)/gnupload $(GNUPLOADFLAGS) \\" @echo " --to $(gnu_rel_host):$(PACKAGE) \\" @echo " $(rel-files)" - @echo '# send the /tmp/announcement e-mail' + @echo '# send the ~/announce-$(my_distdir) e-mail' @echo ===================================== @echo ===================================== @@ -761,17 +756,27 @@ alpha beta stable: $(local-check) writable-files no-submodule-changes $(MAKE) news-check $(MAKE) distcheck $(MAKE) dist XZ_OPT=-9ev - $(MAKE) -s announcement RELEASE_TYPE=$@ > /tmp/announce-$(my_distdir) + $(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 - $(MAKE) -s emit_upload_commands RELEASE_TYPE=$@ echo $(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 .PHONY: web-manual web-manual: