From d86c4d2326a7c209f710928fc0d8781fd62016f4 Mon Sep 17 00:00:00 2001 From: Herbert Valerio Riedel Date: Sat, 1 Jun 2013 22:18:44 +0200 Subject: [PATCH] Adapt Makefile to consider only tags matching `v[0-9]*` (re #145) --- Makefile | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 4684360bd..a73815d5c 100644 --- a/Makefile +++ b/Makefile @@ -1,5 +1,5 @@ -VERSION = $(shell git describe --tags --abbrev=0 | sed 's/_/\./g') -GIT_VERSION = $(shell git describe --tags --dirty | sed 's/_/\./g') +VERSION = $(shell git describe --tags --match 'v[0-9]*' --abbrev=0 | sed 's/_/\./g;s/^v//') +GIT_VERSION = $(shell git describe --tags --match 'v[0-9]*' --dirty | sed 's/_/\./g;s/^v//') EMACS = emacs EFLAGS = @@ -60,10 +60,9 @@ dist: $(DIST_TGZ) # Generate ELPA-compatible package package: $(PKG_TAR) +elpa: $(PKG_TAR) $(PKG_TAR): $(PKG_DIST_FILES) haskell-mode-pkg.el.in - @echo "VERSION = $(VERSION)" - @echo "GIT_VERSION = $(GIT_VERSION)" rm -rf haskell-mode-$(VERSION) mkdir haskell-mode-$(VERSION) cp $(PKG_DIST_FILES) haskell-mode-$(VERSION)/ @@ -71,6 +70,8 @@ $(PKG_TAR): $(PKG_DIST_FILES) haskell-mode-pkg.el.in sed -e 's/@GIT_VERSION@/$(GIT_VERSION)/g;s/@VERSION@/$(VERSION)/g' < haskell-mode.el > haskell-mode-$(VERSION)/haskell-mode.el #NO_DIST tar cvf $@ haskell-mode-$(VERSION) rm -rf haskell-mode-$(VERSION) + @echo + @echo "Created ELPA compatible distribution package '$@' from $(GIT_VERSION)" $(AUTOLOADS): $(ELFILES) haskell-mode.elc [ -f $@ ] || echo ' ' >$@