mirror of
https://github.com/doomemacs/doomemacs
synced 2025-08-01 12:17:25 -05:00
Doom is moving away from supporting direct modification of its source files, or private modules within Doom's source tree. Instead, customizations should be relegated to ~/.doom.d/ (or ~/.config/doom/, doom will respect XDG conventions if it sees this directory). As suchm a default init.el is now supplied, which will break your custom ~/.emacs.d/init.el! The quick fix: mkdir ~/.doom.d mv ~/.emacs.d/init.el ~/.doom.d/init.el ~/.doom.d/early-init.el is also available if you need to change crucial settings before Doom loads anything. init.el will still be loaded before any other module is.
92 lines
2.0 KiB
Makefile
92 lines
2.0 KiB
Makefile
# Ensure emacs always runs from this makefile's PWD
|
|
EMACS = emacs -q --eval "(setq noninteractive 'doom)"
|
|
DOOM = $(EMACS) --batch -l init.el
|
|
DOOMI = $(subst --batch,,$(DOOM))
|
|
|
|
MODULES = $(patsubst modules/%/, %, $(sort $(dir $(wildcard modules/*/ modules/*/*/))))
|
|
|
|
all: | autoloads autoremove install
|
|
|
|
## Shortcuts
|
|
a: autoloads
|
|
i: install
|
|
u: update
|
|
r: autoremove
|
|
c: compile
|
|
cc: compile-core
|
|
ce: compile-elpa
|
|
d: doctor
|
|
|
|
## Package management
|
|
install: | .local/autoloads.el
|
|
@$(DOOM) -f doom//packages-install
|
|
|
|
update: | .local/autoloads.el
|
|
@$(DOOM) -f doom//packages-update
|
|
|
|
autoremove: | .local/autoloads.el
|
|
@$(DOOM) -f doom//packages-autoremove
|
|
|
|
autoloads:
|
|
@$(DOOM) -f doom//reload-autoloads
|
|
|
|
|
|
## Byte compilation
|
|
# compile
|
|
# compile-core
|
|
# compile-module
|
|
# compile-module/submodule
|
|
compile: | clean
|
|
@$(DOOM) -f doom//byte-compile
|
|
|
|
compile-core: | clean
|
|
@$(DOOM) -f doom//byte-compile-core
|
|
|
|
compile-elpa:
|
|
@$(DOOM) -f doom//byte-recompile-plugins
|
|
|
|
$(patsubst %, compile-%, $(MODULES)): | .local/autoloads.el
|
|
@$(DOOM) -f doom//byte-compile -- $(patsubst compile-%, %, $@)
|
|
|
|
recompile:
|
|
@$(DOOM) -f doom//byte-compile -- -r
|
|
|
|
clean:
|
|
@$(DOOM) -f doom//clean-byte-compiled-files
|
|
|
|
|
|
## Unit tests
|
|
# test
|
|
# test-core
|
|
# test-module
|
|
# test-module/submodule
|
|
test: | .local/autoloads.el
|
|
@$(DOOM) -f doom//run-tests
|
|
|
|
test-core $(patsubst %, test-%, $(MODULES)): | .local/autoloads.el
|
|
@$(DOOM) -f doom//run-tests -- $(subst test-, , $@)
|
|
|
|
# run tests interactively
|
|
testi: | .local/autoloads.el
|
|
@$(DOOMI) -f doom//run-tests
|
|
|
|
|
|
## Utility tasks
|
|
# Runs Emacs from a different folder than ~/.emacs.d; only use this for testing!
|
|
run:
|
|
@$(DOOMI) $(ARGS) --eval "(run-hooks 'after-init-hook 'emacs-startup-hook 'window-setup-hook)"
|
|
|
|
# Diagnoses potential OS/environment issues
|
|
doctor:
|
|
@$(EMACS) --script bin/doom-doctor
|
|
|
|
# Prints debug info about your current setup
|
|
info:
|
|
@$(EMACS) --batch -l core/core.el -l core/autoload/debug.el -f doom/info
|
|
|
|
## Internal tasks
|
|
.local/autoloads.el:
|
|
@$(DOOM) -f doom-initialize-autoloads
|
|
|
|
.PHONY: all compile test testi clean
|