2017-02-07 07:00:34 +08:00
|
|
|
# Ensure emacs always runs from this makefile's PWD
|
|
|
|
EMACS=emacs --batch --eval "(setq user-emacs-directory default-directory)"
|
2016-03-26 01:37:48 +08:00
|
|
|
|
2017-02-07 07:00:34 +08:00
|
|
|
|
|
|
|
# Tasks
|
2017-02-03 10:56:52 +08:00
|
|
|
all: install update autoloads
|
2016-05-29 12:40:13 +08:00
|
|
|
|
2017-02-03 10:56:52 +08:00
|
|
|
install: init.el
|
2017-02-07 07:00:34 +08:00
|
|
|
@$(EMACS) -l core/core.el -f 'doom/packages-install'
|
2016-02-26 22:37:20 +08:00
|
|
|
|
2017-02-03 10:56:52 +08:00
|
|
|
update: init.el
|
2017-02-07 07:00:34 +08:00
|
|
|
@$(EMACS) -l core/core.el -f 'doom/packages-update'
|
2016-03-26 01:37:48 +08:00
|
|
|
|
2017-02-09 16:49:16 +08:00
|
|
|
autoremove: init.el
|
2017-02-07 07:00:34 +08:00
|
|
|
@$(EMACS) -l core/core.el -f 'doom/packages-autoremove'
|
2017-02-03 20:58:16 +08:00
|
|
|
|
|
|
|
autoloads: init.el
|
2017-02-07 07:00:34 +08:00
|
|
|
@$(EMACS) -l init.el -f 'doom/refresh-autoloads'
|
2016-03-26 01:37:48 +08:00
|
|
|
|
2017-02-01 08:53:00 +08:00
|
|
|
compile: init.el clean-elc
|
2017-02-07 07:00:34 +08:00
|
|
|
@$(EMACS) -l init.el -f 'doom/byte-compile'
|
2017-02-03 10:56:52 +08:00
|
|
|
|
2017-02-06 14:24:37 +08:00
|
|
|
compile-lite: init.el clean-elc
|
2017-02-07 07:00:34 +08:00
|
|
|
@$(EMACS) -l core/core.el --eval '(doom/byte-compile t)'
|
2016-03-26 01:37:48 +08:00
|
|
|
|
2017-02-09 16:49:16 +08:00
|
|
|
clean:
|
2017-01-17 12:30:37 +08:00
|
|
|
@rm -fv init.elc
|
|
|
|
@find {core,modules} -type f -iname '*.elc' -exec rm \-fv {} \;
|
2016-04-08 13:44:10 +08:00
|
|
|
|
2017-02-09 16:49:16 +08:00
|
|
|
clean-cache:
|
|
|
|
@$(EMACS) -l core/core.el --eval '(delete-directory doom-cache-dir t)'
|
|
|
|
|
2017-02-04 08:17:09 +08:00
|
|
|
test:
|
2017-02-09 16:49:16 +08:00
|
|
|
@$(EMACS) -l test/init.el -f 'doom-run-tests'
|
2017-02-04 08:17:09 +08:00
|
|
|
|
2017-01-31 17:31:14 +08:00
|
|
|
init.el:
|
2017-02-08 15:02:51 +08:00
|
|
|
@[ -f init.el ] || $(error No init.el file; create one or copy init.example.el)
|
2017-01-31 17:31:14 +08:00
|
|
|
|
2017-02-04 08:17:09 +08:00
|
|
|
.PHONY: all test
|