From 3f20fe551338d020fa017280fa6204445f3f2086 Mon Sep 17 00:00:00 2001 From: Jonas Fonseca Date: Thu, 31 May 2007 11:56:52 +0200 Subject: [PATCH] Rename sync-docs to release-doc; add release-dist rule Additionally, allow VERSION to be overwritten from the command line by setting DIST_VERSION. --- Makefile | 14 ++++++++++++-- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/Makefile b/Makefile index ccc7e09..57196b0 100644 --- a/Makefile +++ b/Makefile @@ -4,7 +4,8 @@ mandir = $(prefix)/man docdir = $(prefix)/share/doc # DESTDIR= -# Get version either via git or from VERSION file +# Get version either via git or from VERSION file. Allow either +# to be overwritten by setting DIST_VERSION on the command line. ifneq (,$(wildcard .git)) GITDESC = $(subst tig-,,$(shell git describe)) WTDIRTY = $(if $(shell git-diff-index HEAD 2>/dev/null),-dirty) @@ -12,6 +13,10 @@ VERSION = $(GITDESC)$(WTDIRTY) else VERSION = $(shell test -f VERSION && cat VERSION || echo "unknown-version") endif +ifdef DIST_VERSION +VERSION = $(DIST_VERSION) +endif + RPM_VERSION = $(subst -,.,$(VERSION)) LDLIBS = -lcurses @@ -79,7 +84,7 @@ rpm: dist rpmbuild -ta $(TARNAME).tar.gz # Maintainer stuff -sync-docs: +release-doc: git checkout release && \ git merge master && \ make clean doc-man doc-html && \ @@ -87,6 +92,11 @@ sync-docs: git commit -m "Sync docs" && \ git checkout master +release-dist: release-doc + git checkout release && \ + make dist && \ + git checkout master + .PHONY: all all-debug doc doc-man doc-html install install-doc \ install-doc-man install-doc-html clean spell-check dist rpm -- 2.30.2