forked from immerrr/lua-mode
-
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
58 lines (41 loc) · 1.62 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
47
48
49
50
51
52
53
54
55
56
57
58
# 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_MAJOR_VERSION=$(shell $(EMACS) -batch -eval '(princ emacs-major-version)')
LUA_MODE_ELC=lua-mode.$(EMACS_MAJOR_VERSION).elc
EMACS_BATCH=$(EMACS) --batch -Q
default:
@echo version is $(VERSION)
%.$(EMACS_MAJOR_VERSION).elc: %.elc
mv $< $@
%.elc: %.el
$(EMACS_BATCH) -f batch-byte-compile $<
compile: $(LUA_MODE_ELC)
dist:
rm -f $(DISTFILE) && \
git archive --format=zip -o $(DISTFILE) --prefix=lua-mode/ HEAD
.PHONY: test-compiled-nocask test-uncompiled-nocask test-compiled test-uncompiled
# check both regular and compiled versions
test-nocask: test-compiled-nocask test-uncompiled-nocask
test: test-compiled test-uncompiled
test-compiled-nocask: $(LUA_MODE_ELC)
$(EMACS) -batch -l $(LUA_MODE_ELC) -l buttercup -f buttercup-run-discover
test-uncompiled-nocask:
$(EMACS) -batch -l lua-mode.el -l buttercup -f buttercup-run-discover
test-compiled: $(LUA_MODE_ELC)
EMACS=$(EMACS) cask exec buttercup -l $(LUA_MODE_ELC)
test-uncompiled:
EMACS=$(EMACS) cask exec buttercup -l lua-mode.el
tryout:
cask exec $(EMACS) -Q -l init-tryout.el test.lua
tryout-nocask:
$(EMACS) -Q -l init-tryout.el test.lua
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!'