-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
34 lines (30 loc) · 862 Bytes
/
Copy pathMakefile
File metadata and controls
34 lines (30 loc) · 862 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
SHELL := /bin/bash
OS := $(shell uname -s 2>/dev/null | tr [:upper:] [:lower:])
ifeq ($(OS), linux)
EMACS := /usr/local/bin/emacs
else ifeq ($(OS), darwin)
EMACS := /Applications/Emacs.app/Contents/MacOS/Emacs
else
ERR := $(error os is not supported)
endif
CONFIG_DIR := ~/.emacs.d/
FONT_DIR := /usr/share/fonts/truetype/custom
install-linux-fonts:
if [ "$(OS)" == "linux" ]; then \
sudo mkdir -p $(FONT_DIR); \
sudo find ~/.emacs.d/fonts/ -type f \( -iname "*.ttf" -or -iname "*.otf" \) -exec cp -t $(FONT_DIR) '{}' + ; \
sudo fc-cache -f -v; \
fi
setup:
mkdir -p ~/.emacs.d/snippets/
byte-compile-directory:
$(EMACS) --batch --eval '(byte-recompile-directory "$(CONFIG_DIR)" 0)'
clean:
find $(CONFIG_DIR) -type f -iname "*.elc" -exec rm {} +
test:
@echo $(OS)
@echo $(EMACS)
.PHONY: err
err: ; $(ERR)
# install:
# cp init.el ~/.emacs