forked from immerrr/lua-mode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
46 lines (35 loc) · 1.36 KB
/
Makefile
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
# Makefile for lua-mode
VERSION="$(shell sed -nre '/^;; Version:/ { s/^;; Version:[ \t]+//; p }' lua-mode.el)"
DISTFILE = lua-mode-$(VERSION).zip
# EMACS value may be overridden
EMACS?=emacs
EMACS_BATCH=cask exec $(EMACS) --batch -Q
TESTS=
TESTS += ert-tests/test-defun-font-lock.el
TESTS += ert-tests/test-builtin-font-lock.el
TESTS += ert-tests/test-electric-mode.el
default:
@echo version is $(VERSION)
compile:
$(EMACS_BATCH) -f batch-byte-compile lua-mode.el
dist:
rm -f $(DISTFILE) && \
git archive --format=zip -o $(DISTFILE) --prefix=lua-mode/ HEAD
.PHONY: test test-compiled test-uncompiled
# check both regular and compiled versions
test: test-compiled test-uncompiled
test-compiled: compile
$(EMACS_BATCH) -l ert-tests/ert.el \
-l lua-mode.elc -l ert-tests/lua-font-lock-test-helpers.el \
$(addprefix -l ,$(TESTS)) -f ert-run-tests-batch-and-exit
test-uncompiled:
$(EMACS_BATCH) -l ert-tests/ert.el \
-l lua-mode.el -l ert-tests/lua-font-lock-test-helpers.el \
$(addprefix -l ,$(TESTS)) -f ert-run-tests-batch-and-exit
release:
git fetch && \
git diff remotes/origin/master --exit-code && \
git tag -a -m "Release tag" rel-$(VERSION) && \
woger lua-l lua-mode lua-mode "release $(VERSION)" "Emacs major mode for editing Lua files" release-notes-$(VERSION) http://github.com/immerrr/lua-mode/ && \
git push origin master
@echo 'Send update to ELPA!'