summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorHans Ulrich Niedermann <hun@n-dimensional.de>2008-07-26 10:36:31 +0200
committerHans Ulrich Niedermann <hun@n-dimensional.de>2008-07-26 11:11:08 +0200
commit9c4a035b71c7648b006b91a52e86edb2baea5138 (patch)
tree7bcf5c2f4455887a9786bdb60708126ef936329b
parentfefebc702664a683ceeafa800b0fe75178d63037 (diff)
downloadnbb-9c4a035b71c7648b006b91a52e86edb2baea5138.tar.gz
nbb-9c4a035b71c7648b006b91a52e86edb2baea5138.tar.xz
nbb-9c4a035b71c7648b006b91a52e86edb2baea5138.zip
New version tag syntax: "make tag VER=1.2"HEADnbb-0.2master
-rw-r--r--Makefile.am17
1 files changed, 9 insertions, 8 deletions
diff --git a/Makefile.am b/Makefile.am
index 619414f..9b76bb5 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -47,6 +47,7 @@ endif
# Requires git 1.5 to work properly.
if HAVE_GIT
+# Usage: $ make tag VER=1.2
tag:
test -d "$(top_srcdir)/.git"
@cd "$(top_srcdir)" && $(GIT) status;:
@@ -56,15 +57,15 @@ tag:
@cd "$(top_srcdir)" && if $(GIT) diff-index --cached --quiet HEAD; then :; else \
echo "Uncommitted cached changes detected."; \
exit 2; fi
- @if test "x$(TAG)" = "x"; then \
- echo "TAG not defined. Try 'make tag TAG=2.11' or something similar."; \
+ @if test "x$(VER)" = "x"; then \
+ echo "VER not defined. Try 'make tag VER=2.11' or something similar."; \
exit 3; \
fi
- @test "x$$(echo "$(TAG)" | $(SED) 's/^[0-9]\{1,\}\.[0-9]\{1,\}//')" = "x" || { \
- echo "TAG=$(TAG) is not in numerical 'x.y' format."; \
+ @test "x$$(echo "$(VER)" | $(SED) 's/^[0-9]\{1,\}\.[0-9]\{1,\}//')" = "x" || { \
+ echo "VER=$(VER) is not in numerical 'x.y' format."; \
exit 4; }
- @test "x$$($(SED) '1q' '$(top_srcdir)/NEWS')" = "x$(PACKAGE_TARNAME) $(TAG)" || { \
- echo "NEWS does not start with entry for '$(PACKAGE_TARNAME) $(TAG)'"; \
+ @test "x$$($(SED) '1q' '$(top_srcdir)/NEWS')" = "x$(PACKAGE_TARNAME) $(VER)" || { \
+ echo "NEWS does not start with entry for '$(PACKAGE_TARNAME) $(VER)'"; \
exit 5; }
@$(SED) -n '1p; 2,/^$(PACKAGE_TARNAME) / p' '$(top_srcdir)/NEWS' \
| $(SED) '$$ { /^$(PACKAGE_TARNAME) / d }' | $(SED) '$$ { /^$$/d }' \
@@ -72,10 +73,10 @@ tag:
@echo "======================================================================="
@cat TAG-MESSAGE
@echo "======================================================================="
- @echo "Do you really want to tag this as release 'v$(TAG)'? Enter to continue, Ctrl-C to abort."
+ @echo "Do you really want to tag this as release '$(PACKAGE_TARNAME)-$(VER)'? Enter to continue, Ctrl-C to abort."
@read
msgfile="$$PWD/TAG-MESSAGE"; \
- cd "$(top_srcdir)" && $(GIT) tag -s -F "$$msgfile" "$(PACKAGE_TARNAME)-$(TAG)"; \
+ cd "$(top_srcdir)" && $(GIT) tag -s -F "$$msgfile" "$(PACKAGE_TARNAME)-$(VER)"; \
rm -f "$$msgfile"
endif