forked from polymode/polymode
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
73 lines (54 loc) · 1.92 KB
/
Makefile
File metadata and controls
73 lines (54 loc) · 1.92 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
69
70
71
72
73
MODULE = POLYMODE
export EMACS ?= emacs
EMACS_VERSION = $(shell ${EMACS} -Q --batch --eval "(princ emacs-version)")
ELPA_DIR := .ELPA/$(EMACS_VERSION)
EMACSRUN = $(EMACS) -Q -L . -L modes -L tests -L $(ELPA_DIR)
EMACSBATCH = $(EMACSRUN) --batch
ELS = $(wildcard *.el)
LINTELS = $(filter-out polymode-autoloads.el polymode-compat.el polymode-configuration.el, $(ELS))
OBJECTS = $(ELS:.el=.elc)
# export PM_VERBOSE
.PHONY: build test version clean cleansilent cleanall
all: build checkdoc test
build: version cleansilent
@echo "******************* BUILDING $(MODULE) *************************"
@$(EMACSBATCH) --funcall batch-byte-compile *.el
checkdoc: version
@echo "******************* CHECKDOC $(MODULE) *************************"
@$(EMACSBATCH) --load targets/checkdoc.el $(LINTELS)
clean:
rm -f $(OBJECTS) polymode-autoloads.el
cleanall: cleansilent
rm -rf $(ELPA_DIR)
cleansilent:
@rm -f $(OBJECTS)
deploy:
cd ../polymode.github.io/; mkdocs gh-deploy --config-file ../polymode/mkdocs.yml --remote-branch master
lint: version
@$(EMACSBATCH) --load targets/melpa-init.el --load targets/lint.el $(LINTELS)
melpa: version
@$(EMACSBATCH) --load targets/melpa.el
elpa: melpa
start: version melpa
$(EMACSRUN) -L . \
--load targets/melpa-init.el \
--load tests/*.el
startvs: version
$(EMACSRUN) -L . \
--load targets/melpa-init.el \
--load targets/local.el \
--load tests/*.el --load ~/.eBasic.el
test: version clean
@echo "******************* TESTING $(MODULE) **************************"
@$(EMACSBATCH) --load targets/melpa-init.el --load targets/test.el
version:
@echo "EMACS VERSION: $(EMACS_VERSION)"
@echo "GIT HEAD: $(shell git rev-parse --short HEAD)"
template../%:
@echo $@
$(eval OUTDIR := $(subst template, , $@))
$(eval ABSDIR := $(abspath $(OUTDIR)))
./targets/template.sh $(ABSDIR)
update-versions:
@echo "******************* UPDATING VERSIONS **************************"
@./targets/update-versions.sh