File tree 1 file changed +13
-20
lines changed
1 file changed +13
-20
lines changed Original file line number Diff line number Diff line change 1
1
THIS_MAKEFILE_DIR = $(abspath $(dir $(lastword $(MAKEFILE_LIST ) ) ) )
2
- EMACS ?= emacs
3
- SRC =org-gcal.el org-generic-id.el
4
- TEST =test/org-gcal-test.el test/org-generic-id-test.el
5
- BUILD_LOG = build.log
6
- CASK ?= cask
7
- PKG_DIR := $(shell $(CASK ) package-directory)
8
- ELCFILES = $(SRC:.el=.elc )
9
- .DEFAULT_GOAL := all
10
2
11
- .PHONY : all clean load-path compile test elpa
3
+ export EMACS ?= $(shell command -v emacs 2>/dev/null)
4
+ CASK_DIR := $(shell cask package-directory)
12
5
13
- all : compile test
6
+ $(CASK_DIR ) : Cask
7
+ cask install
8
+ @touch $(CASK_DIR )
14
9
15
- clean :
16
- rm -f $( ELCFILES ) $( BUILD_LOG ) ; rm -rf $( PKG_DIR )
10
+ .PHONY : cask
11
+ cask : $( CASK_DIR )
17
12
18
- elpa : $(PKG_DIR )
19
- $(PKG_DIR ) : Cask
20
- $(CASK ) install
21
- touch $(PKG_DIR )
22
-
23
- compile : $(SRC ) elpa
24
- $(CASK ) build 2>&1 | tee $(BUILD_LOG ) ; \
25
- ! ( grep -E -e ' :(Warning|Error):' $( BUILD_LOG) )
13
+ .PHONY : compile
14
+ compile : cask
15
+ cask emacs -batch -L . -L test \
16
+ --eval "(setq byte-compile-error-on-warn t)" \
17
+ -f batch-byte-compile $$(cask files); \
18
+ (ret=$$? ; cask clean-elc && exit $$ret)
26
19
27
20
test : $(SRC ) $(TEST ) elpa
28
21
$(CASK ) exec ert-runner -L $(THIS_MAKEFILE_DIR ) \
You can’t perform that action at this time.
0 commit comments