forked from clojure-emacs/cider
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
63 lines (51 loc) · 1.29 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
EMACS ?= emacs
EMACSFLAGS = -L .
CASK = cask
VAGRANT = vagrant
VERSION = $(shell git describe --tags --abbrev=0 | sed 's/^v//')
PACKAGE_NAME = cider-$(VERSION)
ELS = $(wildcard *.el)
OBJECTS = $(ELS:.el=.elc)
.depend: $(ELS)
@echo Compute dependencies
@rm -f .depend
@for f in $(ELS); do \
sed -n "s/(require '\(\(cider\|nrepl\)-.*\)).*$$/$${f}c: \1.elc/p" $$f >> .depend;\
done
-include .depend
elpa:
$(CASK) install
$(CASK) update
touch $@
package:
$(CASK) package
mkdir -p packages/$(PACKAGE_NAME)
cp cider-pkg.el packages/$(PACKAGE_NAME)
cp $(ELS) packages/$(PACKAGE_NAME)
tar cf packages/$(PACKAGE_NAME).tar -C packages $(PACKAGE_NAME)
packageclean:
rm cider-pkg.el
rm -rf packages/$(PACKAGE_NAME)
rm packages/$(PACKAGE_NAME).tar
.PHONY: build
build : elpa $(OBJECTS)
.PHONY: test
test : build
$(CASK) exec $(EMACS) --no-site-file --no-site-lisp --batch \
$(EMACSFLAGS) \
-l test/run-tests
.PHONY: virtual-test
virtual-test :
$(VAGRANT) up
$(VAGRANT) ssh -c "make -C /vagrant EMACS=$(EMACS) clean test"
.PHONY: clean
clean :
rm -f .depend $(OBJECTS)
.PHONY: elpaclean
elpaclean : clean
rm -f elpa
rm -rf .cask # Clean packages installed for development
%.elc : %.el
$(CASK) exec $(EMACS) --no-site-file --no-site-lisp --batch \
$(EMACSFLAGS) \
-f batch-byte-compile $<