-
Notifications
You must be signed in to change notification settings - Fork 17
/
Makefile
33 lines (26 loc) · 897 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
EMACS ?= emacs
EL := fstar-mode.el
ELC := $(EL:.el=.elc)
PACKAGE_DIR := $(shell cask package-directory)
ERROR_ON_WARN ?= t
SANDBOX ?= sandbox
.PHONY: sandbox
$(ELC):%.elc:%.el
cask exec ${EMACS} -L . -Q --batch \
--eval "(setq byte-compile-error-on-warn ${ERROR_ON_WARN})" \
-f batch-byte-compile $<
$(PACKAGE_DIR): Cask
cask install
touch $(PACKAGE_DIR)
build: $(PACKAGE_DIR) $(ELC)
sandbox:
mkdir -p sandbox
$(EMACS) -Q --eval '(setq user-emacs-directory "$(SANDBOX)")' -l package \
--eval "(add-to-list 'package-archives '(\"gnu\" . \"http://elpa.gnu.org/packages/\") t)" \
--eval "(add-to-list 'package-archives '(\"melpa\" . \"https://melpa.org/packages/\") t)" \
--eval "(package-refresh-contents)" --eval "(package-initialize)" \
--eval "(package-install-file \"fstar-mode.el\")"
clean:
cask clean-elc
fslit-readme:
./etc/fslit/regen_readme.py