doomemacs/Makefile

61 lines
1.4 KiB
Makefile
Raw Normal View History

# Ensure emacs always runs from this makefile's PWD
2017-03-20 14:44:52 +08:00
EMACS_FLAGS=--eval "(setq user-emacs-directory default-directory)"
EMACS=emacs --batch $(EMACS_FLAGS) -l core/core.el
2016-03-26 01:37:48 +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-21 02:12:24 +08:00
install: init.el
2017-03-20 14:44:52 +08:00
@$(EMACS) -f 'doom-initialize-autoloads' -f 'doom/packages-install'
2017-02-21 02:12:24 +08:00
update: init.el
2017-03-20 14:44:52 +08:00
@$(EMACS) -f 'doom-initialize-autoloads' -f 'doom/packages-update'
2016-03-26 01:37:48 +08:00
2017-02-21 02:12:24 +08:00
autoremove: init.el
2017-03-20 14:44:52 +08:00
@$(EMACS) -f 'doom-initialize-autoloads' -f 'doom/packages-autoremove'
autoloads: init.el
2017-03-20 14:44:52 +08:00
@$(EMACS) -f 'doom/reload-autoloads'
2016-03-26 01:37:48 +08:00
recompile: init.el
@$(EMACS) -f 'doom/recompile'
2017-02-11 13:46:42 +08:00
compile: init.el clean
@$(EMACS) -f 'doom/compile'
compile-lite: init.el clean
@$(EMACS) -f 'doom/compile-lite'
2017-02-03 10:56:52 +08:00
clean:
2017-03-20 14:44:52 +08:00
@$(EMACS) -f 'doom/clean-compiled'
2016-04-08 13:44:10 +08:00
clean-cache:
2017-03-20 14:44:52 +08:00
@$(EMACS) -f 'doom/clean-cache'
# 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
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)
.PHONY: all test bootstrap