-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
28 lines (22 loc) · 932 Bytes
/
Makefile
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
REPO_FILES := $(wildcard .??*)
REPO_CONFIG_DIRS := $(wildcard .config/*)
IGNORE_FILES := .DS_Store .git .gitmodules .gitignore .config
DOT_FILES := $(filter-out $(IGNORE_FILES),$(REPO_FILES))
all: install
check:
@$(foreach dotfile, $(DOT_FILES), /bin/ls -dF $(dotfile);)
@$(foreach configdir, $(REPO_CONFIG_DIRS), echo $(configdir);)
install:
mkdir -p ${HOME}/.config
@$(foreach dotfile, $(DOT_FILES), ln -sfnv $(abspath $(dotfile)) "$(HOME)/$(dotfile)";)
@$(foreach configdir, $(REPO_CONFIG_DIRS), ln -sfnv $(abspath $(configdir)) "$(HOME)/$(configdir)";)
.PHONY: emacs
emacs:
emacs --batch -f batch-byte-compile ~/.emacs.d/init.el
.PHONY: skk
skk:
curl -o ${HOME}/.eskk/SKK-JISYO.L --create-dirs http://openlab.jp/skk/skk/dic/SKK-JISYO.L
touch ${HOME}/.eskk/USER.L
clean:
@-$(foreach dotfile, $(DOT_FILES), rm -vrf $(HOME)/$(dotfile);)
@-$(foreach configdir, $(REPO_CONFIG_DIRS), rm -vrf $(HOME)/$(configdir);)