Repository navigation
Expand file tree
/
Copy pathMakefile
More file actions
68 lines (54 loc) · 1.85 KB
/
Copy pathMakefile
File metadata and controls
68 lines (54 loc) · 1.85 KB
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
# makefie for emacs-android
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/android-lint.el
LINT_FILES = $(filter-out %-pkg.el,${EL_FILES})
# 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
lint: $(LINT_FILES)
$(RUN_EMACS) $(LINT_LOAD_FILES) -f android-lint-files $(LINT_FILES)
package-lint: $(EL_FILES)
$(RUN_EMACS) $(LINT_LOAD_FILES) -f android-package-lint $(EL_FILES)
compile: $(EL_FILES)
$(RUN_EMACS) -f 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 ' 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 lint compile clean help