forked from elp-revive/origami.el
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
53 lines (42 loc) · 1.15 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
SHELL := /usr/bin/env bash
EMACS ?= emacs
CASK ?= cask
INIT="(progn \
(require 'package) \
(push '(\"melpa\" . \"https://melpa.org/packages/\") package-archives) \
(package-initialize) \
(package-refresh-contents))"
LINT="(progn \
(unless (package-installed-p 'package-lint) \
(package-install 'package-lint)) \
(require 'package-lint) \
(package-lint-batch-and-exit))"
ORIGAMI-FILES := $(wildcard ./origami-*.el)
TEST-FILES := test/bootstrap.el $(shell ls test/origami-*.el)
LOAD-FILE = -l $(test-file)
LOAD-TEST-FILES := $(foreach test-file, $(TEST-FILES), $(LOAD-FILE))
build:
EMACS=$(EMACS) cask install
EMACS=$(EMACS) cask build
EMACS=$(EMACS) cask clean-elc
# TODO: Add `checkdoc` and `lint` here when they pass
ci: CASK=
ci: clean compile
compile:
@echo "Compiling..."
@$(CASK) $(EMACS) -Q --batch \
-l test/bootstrap.el \
-L . \
--eval '(setq byte-compile-error-on-warn t)' \
--eval '(setq emacs-lsp-ci t)' \
-f batch-byte-compile $(ORIGAMI-FILES)
lint:
@echo "package linting..."
@$(CASK) $(EMACS) -Q --batch \
-L . \
--eval $(INIT) \
--eval $(LINT) \
$(ORIGAMI-FILES)
clean:
rm -rf .cask *.elc
.PHONY: clean build ci lint compile