aboutsummaryrefslogtreecommitdiff
path: root/Makefile
diff options
context:
space:
mode:
authorFrank Fischer <frank.fischer@mathematik.tu-chemnitz.de>2013-01-18 12:26:31 +0100
committerFrank Fischer <frank.fischer@mathematik.tu-chemnitz.de>2013-01-18 12:26:31 +0100
commit0c5a3d11a00898c6b0b43b2d77131a39ae87fa3a (patch)
treebd11558096d7a39cfb479bb2a24ec9ceeed088c0 /Makefile
parentfc3a9719457f4abddef84157754a22896a97a2f3 (diff)
Fix `version` and `elpa` Makefile targets.
Both stopped to work since evil-pkg.el contains a comment at the beginning of the file.
Diffstat (limited to 'Makefile')
-rw-r--r--Makefile5
1 files changed, 3 insertions, 2 deletions
diff --git a/Makefile b/Makefile
index a336b33..01f4a07 100644
--- a/Makefile
+++ b/Makefile
@@ -1,7 +1,7 @@
SHELL = /bin/sh
EMACS = emacs
FILES = $(filter-out evil-tests.el,$(filter-out evil-pkg.el,$(wildcard evil*.el)))
-VERSION := $(shell sed -n '3s/.*"\(.*\)".*/\1/p' evil-pkg.el)
+VERSION := $(shell sed -ne '1,/define-package/d' -ne '/^\s*"[[:digit:]]\+\(\.[[:digit:]]\+\)*"\s*$$/ s/^.*"\(.*\)".*$$/\1/p' evil-pkg.el)
ELPAPKG = evil-$(VERSION)
PROFILER =
DOC = doc
@@ -110,5 +110,6 @@ elpa:
# Change the version using make VERSION=x.y.z
version:
- cat evil-pkg.el | sed "3s/\".*\"/\"${VERSION}\"/" > evil-pkg.el.new && mv evil-pkg.el.new evil-pkg.el
+ sed -e '/^\s*"[[:digit:]]\+\(\.[[:digit:]]\+\)*"\s*$$/ s/".*"/"${VERSION}"/' evil-pkg.el > evil-pkg.el.new && mv evil-pkg.el.new evil-pkg.el
+ sed -e '/^;;\s\+Version:\s*[[:digit:]]\+\(\.[[:digit:]]\+\)*\s*$$/ s/:.*$$/: ${VERSION}/' -i evil*.el