doomemacs/Makefile

67 lines
1.7 KiB
Makefile
Raw Normal View History

# Ensure emacs always runs from this makefile's PWD
2017-03-20 02:44:52 -04:00
EMACS_FLAGS=--eval "(setq user-emacs-directory default-directory)"
EMACS=emacs --batch $(EMACS_FLAGS) -l core/core.el
TESTS=$(patsubst %,-l %, $(wildcard test/test-*.el))
# Tasks
all: autoloads install update
2016-05-29 00:40:13 -04:00
2017-02-20 13:12:24 -05:00
install: init.el
2017-03-20 02:44:52 -04:00
@$(EMACS) -f 'doom-initialize-autoloads' -f 'doom/packages-install'
2017-02-20 13:12:24 -05:00
update: init.el
2017-03-20 02:44:52 -04:00
@$(EMACS) -f 'doom-initialize-autoloads' -f 'doom/packages-update'
2016-03-25 13:37:48 -04:00
2017-02-20 13:12:24 -05:00
autoremove: init.el
2017-03-20 02:44:52 -04:00
@$(EMACS) -f 'doom-initialize-autoloads' -f 'doom/packages-autoremove'
autoloads: init.el
2017-03-20 02:44:52 -04:00
@$(EMACS) -f 'doom/reload-autoloads'
2016-03-25 13:37:48 -04:00
recompile: init.el
@$(EMACS) -f 'doom/recompile'
2017-02-11 00:46:42 -05:00
compile: init.el clean
@$(EMACS) -f 'doom/compile'
compile-lite: init.el clean
@$(EMACS) -f 'doom/compile-lite'
2017-02-02 21:56:52 -05:00
clean:
2017-03-20 02:44:52 -04:00
@$(EMACS) -f 'doom/clean-compiled'
2016-04-08 01:44:10 -04:00
clean-cache:
2017-03-20 02:44:52 -04:00
@$(EMACS) -f 'doom/clean-cache'
test: init.el
@$(EMACS) -f 'doom-initialize-autoloads' -l ert $(TESTS) -f ert-run-tests-batch-and-exit
test/%: init.el
@$(EMACS) -f 'doom-initialize-autoloads' -l ert -l $@.el -f ert-run-tests-batch-and-exit
# 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 00:45:17 -05:00
# This is only useful if your emacs.d is somewhere other than ~/.emacs.d (for
# development purposes for instance).
run:
2017-03-20 02:44:52 -04:00
@emacs $(EMACS_FLAGS) -q -l init.el
2017-02-20 00:45:17 -05:00
reload:
@$(EMACS) -f 'doom/reload'
2017-01-31 04:31:14 -05:00
init.el:
2017-02-20 13:12:24 -05:00
@[ -e init.el ] || $(error No init.el file; create one or copy init.example.el)
.PHONY: all test bootstrap