diff options
author | Akim Demaille <akim@lrde.epita.fr> | 2012-09-20 11:10:34 +0200 |
---|---|---|
committer | Akim Demaille <akim@lrde.epita.fr> | 2012-09-25 11:50:54 +0200 |
commit | b9a38b4535158a96606a72d41ae3456509356935 (patch) | |
tree | 1f483e897109f7c1ae982f031b165998f3881b85 /top/maint.mk | |
parent | aca9380111bb5df9f12b1aa38b6c202f97df6ac7 (diff) | |
download | gnulib-b9a38b4535158a96606a72d41ae3456509356935.tar.gz |
maint.mk: provide "make upload" to ease uploading
See <http://lists.gnu.org/archive/html/bug-gnulib/2012-08/msg00028.html>.
Do not depend simply on the current $(VERSION), as there may have been
new commits since the tarball generation. Rather, rely on $(RELEASE),
as "make release-commit" already does.
For consistency, add "make release RELEASE='X.Y TYPE'" as an alias for
"make TYPE".
* top/maint.mk (upload_command, upload, release): New.
(RELEASE_TYPE): If undefined, default to the second word of $(RELEASE).
(VERSION): first word of $(RELEASE) is always right.
(emit_upload_commands): Adjust.
* top/README-release: Update.
Diffstat (limited to 'top/maint.mk')
-rw-r--r-- | top/maint.mk | 23 |
1 files changed, 19 insertions, 4 deletions
diff --git a/top/maint.mk b/top/maint.mk index 1851815086..26ebc379a6 100644 --- a/top/maint.mk +++ b/top/maint.mk @@ -107,6 +107,13 @@ my_distdir = $(PACKAGE)-$(VERSION) # Old releases are stored here. release_archive_dir ?= ../release +# If RELEASE_TYPE is undefined, but RELEASE is, use its second word. +# But overwrite VERSION. +ifdef RELEASE + VERSION := $(word 1, $(RELEASE)) + RELEASE_TYPE ?= $(word 2, $(RELEASE)) +endif + # Validate and return $(RELEASE_TYPE), or die. RELEASE_TYPES = alpha beta stable release-type = $(call member-check,RELEASE_TYPE,$(RELEASE_TYPES)) @@ -1329,16 +1336,22 @@ ftp-gnu = ftp://ftp.gnu.org/gnu www-gnu = http://www.gnu.org upload_dest_dir_ ?= $(PACKAGE) +upload_command = \ + $(srcdir)/$(_build-aux)/gnupload $(GNUPLOADFLAGS) \ + --to $(gnu_rel_host):$(upload_dest_dir_) \ + $(rel-files) emit_upload_commands: @echo ===================================== @echo ===================================== - @echo "$(srcdir)/$(_build-aux)/gnupload $(GNUPLOADFLAGS) \\" - @echo " --to $(gnu_rel_host):$(upload_dest_dir_) \\" - @echo " $(rel-files)" + @echo '$(upload_command)' @echo '# send the ~/announce-$(my_distdir) e-mail' @echo ===================================== @echo ===================================== +.PHONY: upload +upload: + $(AM_V_GEN)$(upload_command) + define emit-commit-log printf '%s\n' 'maint: post-release administrivia' '' \ '* NEWS: Add header line for next release.' \ @@ -1384,7 +1397,7 @@ public-submodule-commit: gl_public_submodule_commit ?= public-submodule-commit check: $(gl_public_submodule_commit) -.PHONY: alpha beta stable +.PHONY: alpha beta stable release ALL_RECURSIVE_TARGETS += alpha beta stable alpha beta stable: $(local-check) writable-files $(submodule-checks) $(AM_V_GEN)test $@ = stable \ @@ -1398,6 +1411,8 @@ alpha beta stable: $(local-check) writable-files $(submodule-checks) $(AM_V_at)$(MAKE) $(release-prep-hook) RELEASE_TYPE=$@ $(AM_V_at)$(MAKE) -s emit_upload_commands RELEASE_TYPE=$@ +release: $(release-type) + # Override this in cfg.mk if you follow different procedures. release-prep-hook ?= release-prep |