forked from emacs-eclim/emacs-eclim
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
70 lines (56 loc) · 1.86 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
59
60
61
62
63
64
65
66
67
68
69
70
# makefie for emacs-eclim
EL_FILES := $(sort $(wildcard *.el))
ELC_FILES := $(EL_FILES:.el=.elc)
EMACS := emacs
CASK := cask
LOAD_PATH := -L .
EMACS_OPTS :=
EMACS_BATCH := $(EMACS) -Q -batch -L . $(EMACS_OPTS)
LINT_LOAD_FILES = -l maint/eclim-lint.el
# Program availability
ifdef CASK
RUN_EMACS = $(CASK) exec $(EMACS_BATCH)
HAVE_CASK := $(shell sh -c "command -v $(CASK)")
ifndef HAVE_CASK
$(warning "$(CASK) is not available. Please run make help")
endif
endif
VPATH := .
all: test
init:
$(CASK) install
$(CASK) update
test:
$(CASK) exec ert-runner
specs:
$(CASK) exec buttercup -L . -L ./test/specs
lint: $(EL_FILES)
$(RUN_EMACS) $(LINT_LOAD_FILES) -f eclim-lint-files $(EL_FILES)
package-lint: $(EL_FILES)
$(RUN_EMACS) $(LINT_LOAD_FILES) -f eclim-package-lint $(EL_FILES)
compile: $(EL_FILES)
$(RUN_EMACS) -l maint/eclim-compile.el -f eclim/batch-byte-compile $(EL_FILES)
clean:
rm -f *.elc test/*.elc
help:
@echo 'Run `make init` first to install and update all local dependencies.'
@echo ''
@echo 'Available targets:'
@echo ' init: Initialise the project. RUN FIRST!'
@echo ' lint: Check all Emacs Lisp sources'
@echo ' compile: Byte-compile Emacs Lisp sources'
@echo ' test: Run all ERT unit tests'
@echo ' specs: Run all buttercup tests'
@echo ' clean: Clean compiled files'
@echo ' package-lint: Checks for common errors in the package metadata.'
@echo ''
@echo 'Available make variables:'
@echo ' EMCS_OPTS: Additional options to pass to `emacs`'
@echo ' EMACS: The path or name of the Emacs to use for tests and compilation'
@echo ''
@echo 'Available programs:'
@echo ' $(CASK): $(if $(HAVE_CASK),yes,no)'
@echo ''
@echo 'You need $(CASK) to develop this package.'
@echo 'See http://cask.readthedocs.io/ for more information.'
.PHONY: all init test specs lint compile clean help