From 213efc094dda6b1b26b4e47b3282633f53ba5d55 Mon Sep 17 00:00:00 2001 From: "Alfred M. Szmidt" Date: Sun, 13 Dec 2009 15:11:14 +0100 Subject: [PATCH] maint.mk: allow a project to override release-prep commands * top/maint.mk (alpha, beta, stable): Move release-preparatory commands into a new rule. (release-prep): New rule. (release-prep-hook): New overridable variable. --- ChangeLog | 8 ++++++++ top/maint.mk | 13 +++++++++++-- 2 files changed, 19 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 13b22ffd9..91fd096a9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,11 @@ +2009-12-05 Alfred M. Szmidt + + maint.mk: allow a project to override release-prep commands + * top/maint.mk (alpha, beta, stable): Move release-preparatory + commands into a new rule. + (release-prep): New rule. + (release-prep-hook): New overridable variable. + 2009-12-13 Bruno Haible * lib/localcharset.c (locale_charset): Fix comment about use of GetACP. diff --git a/top/maint.mk b/top/maint.mk index f0fdee492..be061a6d4 100644 --- a/top/maint.mk +++ b/top/maint.mk @@ -750,12 +750,21 @@ 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 > /tmp/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 -- 2.11.0