f058505306
This commit adds bin/doom, which acts as the middle man that make once was (and will stay for a while, though the documentation will shift away from using it). It does everything the previous make interface did, but is faster and more flexible. bin/doom should eventually replace the makefile. bin/doom also makes it easier to run Doom outside of ~/.emacs.d and ~/.doom.d with, for example: bin/doom run -p ~/.other.doom.d/ -e ~/.other.emacs.d bin/doom.cmd is included for Windows users, but I don't recommend using it yet. It hasn't been tested nor have I ever written a batch script before. Also update init.example.el with new defaults.
84 lines
1.4 KiB
Makefile
84 lines
1.4 KiB
Makefile
# Ensure emacs always runs from this makefile's PWD
|
|
DOOM = bin/doom
|
|
EMACS = emacs -q $(ARGS) -l init.el
|
|
|
|
MODULES = $(patsubst modules/%/, %, $(sort $(dir $(wildcard modules/*/ modules/*/*/))))
|
|
|
|
all:
|
|
@$(DOOM) reload
|
|
|
|
## Shortcuts
|
|
a: autoloads
|
|
i: install
|
|
u: update
|
|
U: upgrade
|
|
r: autoremove
|
|
c: compile
|
|
cc: compile-core
|
|
ce: compile-elpa
|
|
re: recompile
|
|
d: doctor
|
|
|
|
quickstart:
|
|
@$(DOOM) quickstart
|
|
|
|
|
|
## Package management
|
|
install:
|
|
@$(DOOM) install
|
|
update:
|
|
@$(DOOM) update
|
|
autoremove:
|
|
@$(DOOM) autoremove
|
|
autoloads:
|
|
@$(DOOM) autoloads
|
|
upgrade:
|
|
@$(DOOM) upgrade
|
|
|
|
## Byte compilation
|
|
compile:
|
|
@$(DOOM) compile
|
|
compile-core:
|
|
@$(DOOM) compile :core
|
|
compile-private:
|
|
@$(DOOM) compile :private
|
|
compile-plugins:
|
|
@$(DOOM) compile :plugins
|
|
recompile:
|
|
@$(DOOM) recompile
|
|
clean:
|
|
@$(DOOM) clean
|
|
# compile-module
|
|
# compile-module/submodule
|
|
$(patsubst %, compile-%, $(MODULES)): | .local/autoloads.el
|
|
@$(DOOM) $@ $(subst compile-, , $@)
|
|
|
|
|
|
## Unit tests
|
|
test:
|
|
@$(DOOM) test
|
|
test-core:
|
|
@$(DOOM) test :core
|
|
# test-module
|
|
# test-module/submodule
|
|
$(patsubst %, test-%, $(MODULES)):
|
|
@$(DOOM) test $(subst test-, , $@)
|
|
# run tests interactively
|
|
testi:
|
|
@$(EMACS) -l core/autoload/doom.el -f doom//run-tests
|
|
|
|
|
|
## Utility tasks
|
|
# Runs Emacs from a different folder than ~/.emacs.d; only use this for testing!
|
|
run:
|
|
@$(EMACS)
|
|
# Prints debug info about your current setup
|
|
info:
|
|
@$(DOOM) info
|
|
|
|
# Diagnoses potential OS/environment issues
|
|
doctor:
|
|
@$(DOOM) doctor
|
|
|
|
.PHONY: all compile test testi clean
|