summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--Makefile.am17
1 files changed, 14 insertions, 3 deletions
diff --git a/Makefile.am b/Makefile.am
index b7fd92d..aa48b71 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -34,12 +34,23 @@ if HAVE_NDIM_MAN2TXT
mv -f "$@.new" "$@"
endif
+# Requires git 1.5 to work properly.
tag:
test -d "$(top_srcdir)/.git"
- cd "$(top_srcdir)" && git status;:
+ @cd "$(top_srcdir)" && git status;:
+ @cd "$(top_srcdir)" && git-diff-files --quiet
+ @cd "$(top_srcdir)" && git-diff-index --cached --quiet HEAD
+ test "x$$($(SED) '/^$(PACKAGE_TARNAME) $(PACKAGE_VERSION)$$/,$$ d' '$(top_srcdir)/NEWS')" = "x"
+ @$(SED) -n '/^$(PACKAGE_TARNAME) $(PACKAGE_VERSION)$$/,/^$(PACKAGE_TARNAME) / p' '$(top_srcdir)/NEWS' \
+ | $(SED) '$$d' | $(SED) '$$ { /^$$/d }' \
+ > TAG-MESSAGE
+ @cat TAG-MESSAGE
@echo "Do you really want to tag this as rel-$(PACKAGE_VERSION)? Enter to continue, Ctrl-C to abort."
- @read
- cd "$(top_srcdir)" && git tag "rel-$(PACKAGE_VERSION)"
+ @msg="$$PWD/TAG-MESSAGE"; \
+ trap "rm $$msg" TERM QUIT ABRT INT; read ignore_this; \
+ args=""; \
+ test "x$$(echo "$(PACKAGE_VERSION)" | $(SED) 's/^[0-9]\{1,\}\.[0-9]\{1,\}//')" = "x" && args="-s -F $$msg"; \
+ cd "$(top_srcdir)" && echo git tag $${args} "v$(PACKAGE_VERSION)"; rm "$$msg"
UPLOAD_DIR = upload-dir
ALL_UPLOAD_FILES = $(UPLOAD_FILES) $(distdir).tar.bz2