-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathMakefile
More file actions
47 lines (37 loc) · 924 Bytes
/
Makefile
File metadata and controls
47 lines (37 loc) · 924 Bytes
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
EMACS ?= emacs
EMACSFLAGS += --directory .
CASK ?= cask
PKGDIR := $(shell EMACS=$(EMACS) $(CASK) package-directory)
DESTDIR ?= dist
EMACSBATCH := $(EMACS) --no-site-file --no-site-lisp --quick --batch $(EMACSFLAGS)
# Export Emacs to goals, mainly for CASK
CASK_EMACS := $(EMACS)
export EMACS
export CASK_EMACS
SRCS := xcode-parser.el xcode-project.el
OBJS := $(SRCS:.el=.elc)
TEST_DIR := test
TEST_SRCS := xcode-parser-test.el xcode-project-test.el
.PHONY : all
all : $(OBJS)
.PHONY : clean
clean :
rm -rf $(OBJS)
.PHONY : distclean
distclean : clean
rm -rf $(DESTDIR)
rm -rf .cask
.PHONY : dist
dist :
$(CASK) package $(DESTDIR)
.PHONY : test
test : all $(SWIFT_MODE_SRCS)
$(CASK) exec $(EMACSBATCH) \
$(TEST_SRCS:%=--load $(TEST_DIR)/%) \
--funcall ert-run-tests-batch-and-exit
$(PKGDIR) : Cask
$(CASK) install
touch $(@)
%.elc : %.el $(PKGDIR)
$(CASK) exec $(EMACSBATCH) \
-f batch-byte-compile $<