forked from emacs-pe/nix-mode
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
40 lines (26 loc) · 827 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
CASK ?= cask
WGET ?= wget
EMACS = emacs
EMACSFLAGS =
EMACSBATCH = $(EMACS) --batch -Q -L . $(EMACSFLAGS)
export EMACS
PKGDIR := $(shell EMACS=$(EMACS) $(CASK) package-directory)
SRCS := $(shell EMACS=$(EMACS) $(CASK) files)
OBJS = $(SRCS:.el=.elc)
.PHONY: all compile clean
all: compile README.md
compile: $(OBJS)
clean:
$(CASK) clean-elc
test: clean
$(CASK) exec $(EMACSBATCH) -L . -l nix-mode-test.el -f ert-run-tests-batch-and-exit
%.elc: %.el $(PKGDIR)
$(CASK) exec $(EMACSBATCH) -f batch-byte-compile $<
$(PKGDIR): Cask
$(CASK) install
touch $(PKGDIR)
README.md: el2markdown.el nix-mode.el
$(CASK) exec $(EMACSBATCH) -l $< nix-mode.el -f el2markdown-write-readme
el2markdown.el:
$(WGET) -q -O $@ "https://github.com/Lindydancer/el2markdown/raw/master/el2markdown.el"
.INTERMEDIATE: el2markdown.el