-
-
Notifications
You must be signed in to change notification settings - Fork 90
/
Makefile
50 lines (39 loc) · 868 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
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
EMACS ?= emacs
ELDEV ?= $(shell command -v eldev)
FILES = $(wildcard *.el)
ELCFILES = $(FILES:.el=.elc)
TESTFILES = $(foreach file,$(wildcard test/*.el),-l $(file))
TESTSELECTORS =
ifneq ($(TAGS),)
comma := ,
TESTSELECTORS := $(foreach tag,$(subst $(comma), ,$(TAGS)),"(tag $(tag))")
endif
ifneq ($(PATTERN),)
TESTSELECTORS := $(TESTSELECTORS) \"$(PATTERN)\"
endif
# ifneq ($(TESTSELECTORS),)
# TESTSELECTORS := (quote (or $(TESTSELECTORS)))
# endif
.PHONY: all
all: compile
.PHONY: eldev
eldev:
ifeq ($(ELDEV),)
$(error "Install eldev (https://github.com/doublep/eldev)")
endif
.PHONY: test
test:
$(ELDEV) test $(TESTSELECTORS)
.PHONY: clean
clean:
make -C js clean
@rm $(ELCFILES) 2>/dev/null || true
.PHONY: clean-eldev
clean-eldev:
@rm -rf .eldev/ 2>/dev/null || true
.PHONY: widgets
widgets:
make -C js
.PHONY: compile
compile:
$(ELDEV) compile