forked from kidd/org-gcal.el
-
-
Notifications
You must be signed in to change notification settings - Fork 3
/
Makefile
34 lines (27 loc) · 987 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
THIS_MAKEFILE_DIR = $(abspath $(dir $(lastword $(MAKEFILE_LIST))))
EMACS ?= emacs
SRC=org-gcal.el org-generic-id.el oauth2-auto.el
TEST=test/org-gcal-test.el test/org-generic-id-test.el
BUILD_LOG = build.log
CASK ?= cask
PKG_DIR := $(shell $(CASK) package-directory)
ELCFILES = $(SRC:.el=.elc)
.DEFAULT_GOAL := all
.PHONY: all clean load-path compile test elpa update-oauth2-auto
all: compile test
clean:
rm -f $(ELCFILES) $(BUILD_LOG); rm -rf $(PKG_DIR)
elpa: $(PKG_DIR)
$(PKG_DIR): Cask
$(CASK) install
touch $@
compile: $(SRC) elpa
$(CASK) build 2>&1 | tee $(BUILD_LOG); \
! ( grep -E -e ':(Warning|Error):' $(BUILD_LOG) )
test: $(SRC) $(TEST) elpa
$(CASK) exec ert-runner -L $(THIS_MAKEFILE_DIR) \
$(foreach test,$(TEST),$(addprefix $(THIS_MAKEFILE_DIR)/,$(test)))
# Vendor oauth2-auto from my fork until oauth2-auto is added to MELPA.
update-oauth2-auto:
curl -o oauth2-auto.el \
https://raw.githubusercontent.com/telotortium/emacs-oauth2-auto/main/oauth2-auto.el