2017-02-07 07:00:34 +08:00
|
|
|
# Ensure emacs always runs from this makefile's PWD
|
2017-04-06 09:43:02 +08:00
|
|
|
EMACS_LIBS=-l core/core.el
|
|
|
|
EMACS=emacs --batch --eval '(setq user-emacs-directory default-directory)' $(EMACS_LIBS)
|
|
|
|
TEST_EMACS=$(EMACS) --eval '(setq noninteractive nil)' $(EMACS_LIBS)
|
|
|
|
TESTS=$(patsubst %,-l %, $(wildcard test/**/test-*.el))
|
2017-02-07 07:00:34 +08:00
|
|
|
|
|
|
|
# Tasks
|
2017-04-06 03:33:51 +08:00
|
|
|
all: autoloads install update
|
2016-05-29 12:40:13 +08:00
|
|
|
|
2017-04-06 09:43:02 +08:00
|
|
|
install: init.el .local/autoloads.el
|
|
|
|
@$(EMACS) -f 'doom/packages-install'
|
2016-02-26 22:37:20 +08:00
|
|
|
|
2017-04-06 09:43:02 +08:00
|
|
|
update: init.el .local/autoloads.el
|
|
|
|
@$(EMACS) -f 'doom/packages-update'
|
2016-03-26 01:37:48 +08:00
|
|
|
|
2017-04-06 09:43:02 +08:00
|
|
|
autoremove: init.el .local/autoloads.el
|
|
|
|
@$(EMACS) -f 'doom/packages-autoremove'
|
2017-02-03 20:58:16 +08:00
|
|
|
|
|
|
|
autoloads: init.el
|
2017-03-20 14:44:52 +08:00
|
|
|
@$(EMACS) -f 'doom/reload-autoloads'
|
2016-03-26 01:37:48 +08:00
|
|
|
|
2017-03-29 03:53:47 +08:00
|
|
|
recompile: init.el
|
|
|
|
@$(EMACS) -f 'doom/recompile'
|
|
|
|
|
2017-02-11 13:46:42 +08:00
|
|
|
compile: init.el clean
|
2017-03-25 13:03:02 +08:00
|
|
|
@$(EMACS) -f 'doom/compile'
|
|
|
|
|
|
|
|
compile-lite: init.el clean
|
|
|
|
@$(EMACS) -f 'doom/compile-lite'
|
2017-02-03 10:56:52 +08:00
|
|
|
|
2017-02-09 16:49:16 +08:00
|
|
|
clean:
|
2017-03-20 14:44:52 +08:00
|
|
|
@$(EMACS) -f 'doom/clean-compiled'
|
2016-04-08 13:44:10 +08:00
|
|
|
|
2017-02-09 16:49:16 +08:00
|
|
|
clean-cache:
|
2017-03-20 14:44:52 +08:00
|
|
|
@$(EMACS) -f 'doom/clean-cache'
|
2017-02-09 16:49:16 +08:00
|
|
|
|
2017-04-06 09:43:02 +08:00
|
|
|
test: init.el .local/autoloads.el
|
|
|
|
@$(TEST_EMACS) $(TESTS) -f 'ert-run-tests-batch-and-exit'
|
2017-04-05 10:18:38 +08:00
|
|
|
|
2017-04-06 09:43:02 +08:00
|
|
|
test/%: init.el .local/autoloads.el
|
|
|
|
@$(TEST_EMACS) -l $@.el -f 'ert-run-tests-batch-and-exit'
|
2017-04-05 10:18:38 +08:00
|
|
|
|
2017-03-20 14:45:31 +08:00
|
|
|
|
|
|
|
# Syntactic sugar for bootstrapping modules. Allows: make bootstrap javascript
|
|
|
|
# See doom/bootstrap for more information.
|
|
|
|
ifeq (bootstrap,$(firstword $(MAKECMDGOALS)))
|
|
|
|
ARGV := $(wordlist 2,$(words $(MAKECMDGOALS)),$(MAKECMDGOALS))
|
|
|
|
$(eval $(ARGV):;@:)
|
|
|
|
endif
|
|
|
|
|
|
|
|
bootstrap: init.el
|
|
|
|
@$(EMACS) -f 'doom-initialize-autoloads' --eval "(doom/bootstrap '($(ARGV)))"
|
|
|
|
|
|
|
|
|
2017-02-20 13:45:17 +08:00
|
|
|
# This is only useful if your emacs.d is somewhere other than ~/.emacs.d (for
|
|
|
|
# development purposes for instance).
|
|
|
|
run:
|
2017-03-20 14:44:52 +08:00
|
|
|
@emacs $(EMACS_FLAGS) -q -l init.el
|
2017-02-20 13:45:17 +08:00
|
|
|
|
2017-03-28 11:23:07 +08:00
|
|
|
reload:
|
|
|
|
@$(EMACS) -f 'doom/reload'
|
|
|
|
|
2017-01-31 17:31:14 +08:00
|
|
|
init.el:
|
2017-02-21 02:12:24 +08:00
|
|
|
@[ -e init.el ] || $(error No init.el file; create one or copy init.example.el)
|
2017-02-21 01:20:15 +08:00
|
|
|
|
2017-04-06 09:43:02 +08:00
|
|
|
.local/autoloads.el:
|
|
|
|
@$(EMACS) -f 'doom-initialize-autoloads'
|
|
|
|
|
2017-03-20 14:45:31 +08:00
|
|
|
|
|
|
|
.PHONY: all test bootstrap
|