Skip to content

Commit

Permalink
Adapt Makefile to consider only tags matching v[0-9]* (re #145)
Browse files Browse the repository at this point in the history
  • Loading branch information
hvr committed Jun 1, 2013
1 parent 29ff368 commit d86c4d2
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -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 =
Expand Down Expand Up @@ -60,17 +60,18 @@ 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)/
sed -e 's/@VERSION@/$(VERSION)/g' < haskell-mode-pkg.el.in > haskell-mode-$(VERSION)/haskell-mode-pkg.el
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 ' ' >$@
Expand Down

0 comments on commit d86c4d2

Please sign in to comment.