James Patrick
d78d015f08
This is currently pretty barebones and is only meant for my current linux machine. Spacemacs can be a bit messy with portability, so I'll need to figure out: 1. How to have custom user-config sections This can be done with a conditional load or a configuration layer. 2. Custom definition of layers. As some layers will be OS specific. Env specific paths in the layers can be moved to the user-config or user-init section but I will need to find the documentation for this again.
34 lines
820 B
Makefile
34 lines
820 B
Makefile
SRC_DIR := $(shell dirname $(realpath $(lastword $(MAKEFILE_LIST))))
|
|
SPACEMACSD := ~/.spacemacs.d
|
|
EMACSD := ~/.emacs.d
|
|
SPACEMACS_URL := https://github.com/syl20bnr/spacemacs
|
|
|
|
include ../lib/shared.mk
|
|
|
|
install: | init update
|
|
|
|
init:
|
|
ifndef IS_SSH
|
|
$(info Remote connection. Not installing emacs.)
|
|
else ifneq ($(call cmd_exist,emacs), true)
|
|
$(info Emacs not installed )
|
|
else
|
|
$(info => installing spacemacs.)
|
|
$(MAKE) -C $(SRC_DIR) spacemacs_init
|
|
$(mk_link) $(SRC_DIR) $(SPACEMACSD)
|
|
endif
|
|
|
|
spacemacs_init:
|
|
ifeq ($(shell [ ! -e $(EMACSD) ] $(return_val_truthy) ), true)
|
|
git clone $(SPACEMACS_URL) $(EMACSD) ; $(report) "Spacemacs installed"
|
|
else
|
|
$(report) warn "$(EMACSD) already exist. Skipping."
|
|
endif
|
|
|
|
update:
|
|
|
|
remove:
|
|
$(info => Removing Emacs config)
|
|
@ $(rm_link) $(EMACSD)
|
|
@ $(rm_link) $(SPACEMACSD)
|