Skip to content

Commit 9c3b186

Browse files
vspinubbatsov
authored andcommitted
Improve makefile (#2071)
- Call `cask build` once during `make test` - Call `cider-bytecomp-warnings` on all files at once - Make all non-file targets .PHONY - Uniform style
1 parent 2a20e36 commit 9c3b186

File tree

1 file changed

+13
-19
lines changed

1 file changed

+13
-19
lines changed

Makefile

Lines changed: 13 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ PACKAGE_NAME = cider-$(VERSION)
77
ELS = $(wildcard *.el)
88
OBJECTS = $(ELS:.el=.elc)
99

10+
.PHONY: elpa build version test test-checks test-bytecomp test-all clean elpaclean run-cider
11+
1012
.depend: $(ELS)
1113
@echo Compute dependencies
1214
@rm -f .depend
@@ -21,41 +23,33 @@ elpa-$(EMACS):
2123
$(CASK) update
2224
touch $@
2325

24-
.PHONY: elpa
2526
elpa: elpa-$(EMACS)
2627

27-
.PHONY: build version
28-
build : elpa $(OBJECTS)
28+
build: version elpa
29+
$(CASK) build
2930

3031
version:
3132
$(EMACS) --version
3233

33-
test-checks : version elpa
34+
test: version build
35+
$(CASK) exec buttercup -L . -L ./test/utils/
36+
37+
test-checks: version elpa
3438
$(CASK) exec $(EMACS) --no-site-file --no-site-lisp --batch \
3539
-l test/scripts/cider-checks.el ./
3640

37-
test-bytecomp : version $(ELS:.el=.elc-test)
38-
39-
%.elc-test : %.el elpa
41+
test-bytecomp: version elpa
4042
$(CASK) exec $(EMACS) --no-site-file --no-site-lisp --batch \
41-
-l test/scripts/cider-bytecomp-warnings.el $<
43+
-l test/scripts/cider-bytecomp-warnings.el $(ELS)
4244

43-
test : version build
44-
$(CASK) exec buttercup -L . -L ./test/utils/
45-
46-
test-all : test-checks test-bytecomp test
45+
test-all: test-checks test-bytecomp test
4746

48-
.PHONY: clean
49-
clean :
47+
clean:
5048
rm -f .depend $(OBJECTS)
5149

52-
.PHONY: elpaclean
53-
elpaclean : clean
50+
elpaclean: clean
5451
rm -f elpa*
5552
rm -rf .cask # Clean packages installed for development
5653

57-
%.elc : %.el
58-
$(CASK) build
59-
6054
run-cider: elpa
6155
cask exec $(EMACS) -Q -L . --eval "(require 'cider)"

0 commit comments

Comments
 (0)