-
-
Notifications
You must be signed in to change notification settings - Fork 112
/
Makefile
30 lines (23 loc) · 798 Bytes
/
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
EMACS ?= emacs
EL_FILES := \
rspec-mode.el \
test/rspec-mode-test.el
ELC_FILES := $(EL_FILES:.el=.elc)
.PHONY: elpa clean test
.SUFFIXES: .el .elc
test: $(ELC_FILES)
${EMACS} -Q --batch -l ert --directory . -l test/rspec-mode-test.el \
--eval '(ert-run-tests-batch-and-exit)'
elpa: *.el
@version=`grep -o "Version: .*" rspec-mode.el | cut -c 10-`; \
dir=rspec-mode-$$version; \
mkdir -p "$$dir"; \
cp -r rspec-mode.el snippets rspec-mode-$$version; \
echo "(define-package \"rspec-mode\" \"$$version\" \
\"Enhance ruby-mode for RSpec\")" \
> "$$dir"/rspec-mode-pkg.el; \
tar cvf rspec-mode-$$version.tar "$$dir"
clean:
@rm -rf rspec-mode-*/ rspec-mode-*.tar *.elc
.el.elc:
${EMACS} -Q --batch -L . --eval '(setq byte-compile-error-on-warn t)' -f batch-byte-compile $<