2019-08-05 00:41:05 +00:00
|
|
|
SRC_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
|
2019-05-17 00:15:39 +00:00
|
|
|
EMACSD := ~/.emacs.d
|
2019-08-05 00:41:05 +00:00
|
|
|
|
|
|
|
# Doom Config
|
|
|
|
DOOMD := ~/.doom.d
|
|
|
|
DOOM_URL := https://github.com/hlissner/doom-emacs
|
|
|
|
|
|
|
|
|
2019-05-17 00:15:39 +00:00
|
|
|
include ../lib/shared.mk
|
|
|
|
|
|
|
|
install: | init update
|
|
|
|
|
|
|
|
init:
|
2019-12-15 05:32:55 +00:00
|
|
|
$(report) header "emacs init"
|
|
|
|
ifneq "$(call cmd_exist,emacs)" "true"
|
|
|
|
$(report) quite "emacs not installed. Skipping install."
|
|
|
|
else ifeq "$(IS_SSH)" "true"
|
|
|
|
$(report) quite "This is a ssh connection. Skipping install."
|
2019-12-13 00:37:35 +00:00
|
|
|
else
|
2019-08-05 00:41:05 +00:00
|
|
|
$(mk_link) $(SRC_DIR)/doom.d $(DOOMD)
|
2019-12-13 16:48:21 +00:00
|
|
|
$(MAKE) -C $(SRC_DIR) doom_init
|
2019-05-17 00:15:39 +00:00
|
|
|
endif
|
|
|
|
|
2019-08-05 00:41:05 +00:00
|
|
|
doom_init:
|
2019-12-15 05:32:55 +00:00
|
|
|
if [ ! -e $(EMACSD) ] ; then \
|
|
|
|
git clone $(DOOM_URL) $(EMACSD) ;\
|
|
|
|
~/.emacs.d/bin/doom --yes install ;\
|
|
|
|
$(report) "doom install" ;\
|
|
|
|
~/.emacs.d/bin/doom --yes compile ':core' ;\
|
|
|
|
$(report) "doom core compile" ;\
|
|
|
|
else ;\
|
|
|
|
$(report) debug "emacsd already exists" ;\
|
|
|
|
fi
|
2019-08-05 00:41:05 +00:00
|
|
|
|
2019-05-17 00:15:39 +00:00
|
|
|
update:
|
2019-12-15 05:32:55 +00:00
|
|
|
if [ -e $(EMACSD)/bin/doom ] ; then \
|
|
|
|
~/.emacs.d/bin/doom --yes purge ;\
|
|
|
|
$(report) info "doom purge" ;\
|
|
|
|
~/.emacs.d/bin/doom --yes refresh ;\
|
|
|
|
$(report) info "doom refresh" ;\
|
|
|
|
else \
|
|
|
|
$(report) debug "doom not setup, so not updating." ;\
|
|
|
|
fi
|
2019-05-17 00:15:39 +00:00
|
|
|
|
|
|
|
remove:
|
|
|
|
$(info => Removing Emacs config)
|
2019-12-13 17:00:11 +00:00
|
|
|
$(rm_link) $(EMACSD)
|