dotfiles/emacs/makefile
James Patrick af5250ee20 Removed support for spacemacs.
I've already switched to doom everywhere, so might as well just remove
support for spacemacs.
2019-12-12 19:52:32 -05:00

45 lines
1.1 KiB
Makefile

SRC_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
EMACSD := ~/.emacs.d
# Doom Config
DOOMD := ~/.doom.d
DOOM_URL := https://github.com/hlissner/doom-emacs
include ../lib/shared.mk
install: | init update
init:
ifndef IS_SSH
$(info Remote connection. Not installing emacs config.)
else ifneq ($(call cmd_exist,emacs), true)
$(info Emacs not installed )
else
$(info => installing doom.)
$(MAKE) -C $(SRC_DIR) doom_init
$(mk_link) $(SRC_DIR)/doom.d $(DOOMD)
endif
doom_init:
ifeq ($(shell [ ! -e $(EMACSD) ] $(return_val_truthy) ), true)
git clone $(DOOM_URL) $(EMACSD) ; $(report) "Doom installed"
$(report) warn "Doom quickstart is about to start. This will take a minute" ; sleep 3
~/.emacs.d/bin/doom --yes quickstart
~/.emacs.d/bin/doom --yes compile ':core'
else
$(report) info "$(EMACSD) already exist. Skipping."
endif
update:
ifeq ($(shell [ -e $(EMACSD) ] $(return_val_truthy) ), false)
$(report) info "Emacs directory doesn't exist."
else ifeq ($(FRAMEWORK), doom)
~/.emacs.d/bin/doom --yes refresh
$(report) info "Doom updated"
endif
remove:
$(info => Removing Emacs config)
@ $(rm_link) $(EMACSD)