-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathMakefile
68 lines (51 loc) · 1.43 KB
/
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
DEST = $(HOME)
# Dotfiles, as they appear in the repo. Each one will be linked to the
# filename you get by prefixing "~/.".
CONFIGS = \
Xdefaults \
Xmodmap \
config/awesome/rc.lua \
config/karabiner \
gitconfig \
fzf.zsh \
pythonstartup \
screenrc \
spacemacs \
vim \
vimrc \
zprofile \
zsh \
zshenv \
zshprompt \
zshrc
# The names of the pathogen bundles we want to install. These are kept as
# submodules in vim/bundle/, and are updated when we install.
PATHOGENBUNDLENAMES = $(shell git submodule status | cut -d' ' -f3 | grep vim | cut -d'/' -f3)
ZSHBUNDLEFILES =
TARGETS = $(patsubst %,$(DEST)/.%,$(CONFIGS))
PATHOGENBUNDLES= $(patsubst %,vim/bundle/%/.git,$(PATHOGENBUNDLENAMES))
ZSHBUNDLES = $(patsubst %,zsh/func/%/.git,$(ZSHBUNDLEFILES))
all: build
install: build $(TARGETS) ~/.vimundo
$(DEST)/.% : %
@mkdir -p $(dir $@)
@[ ! -e $@ ] || [ -h $@ ] || mv -f $@ [email protected]
ln -sf $(PWD)/$* $@
$(DEST)/.%/:
mkdir -p $@
$(DEST)/% : %
@mkdir -p $(dir $@)
@[ ! -e $@ ] || [ -h $@ ] || mv -f $@ [email protected]
ln -sf $(PWD)/$* $@
zsh/antigen.zsh:
curl -L https://raw.githubusercontent.com/zsh-users/antigen/master/antigen.zsh > zsh/antigen.zsh
vim/bundle/%/.git:
git submodule update --init --recursive $(patsubst %/.git,%,$@)
zsh/func/%/.git:
git submodule update --init --recursive $(patsubst %/.git,%,$@)
build: bundles
bundles: $(PATHOGENBUNDLES) $(ZSHBUNDLES)
clean:
@echo Cleaning from $(DEST)
rm -f $(TARGETS)
.PHONY: build install clean