-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
69 lines (56 loc) · 1.16 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
69
.PHONY: all setup clean
DESTDIR=${HOME}
DOTS=\
.bin \
.ackrc \
.dircolors-solarized \
.editrc \
.emacs \
.emacs.d \
.my.cnf \
.git.templates \
.gitconfig \
.inputrc \
.percol.d \
.screenrc \
.tmux.conf \
.source-highlight \
.zsh.sources \
.zfunctions \
.zlogin \
.zshenv \
.zshrc \
.zshrc.linux \
.zshrc.freebsd \
.zshrc.darwin \
DOTS_LOCAL=\
dot.emacs.local \
dot.gitconfig.local \
dot.gitignore.local \
dot.gitattributes.local \
dot.zshrc.local
all: setup
setup: dots-setup
dots-setup: ${DOTS} ${DOTS_LOCAL}
clean: dots-clean
${DOTS}:
rm -f ${DESTDIR}/${subst dot,,$@}
ln -s `pwd`/dot$@ ${DESTDIR}/${subst dot,,$@}
${DOTS_LOCAL}:
touch ${DESTDIR}/${subst dot,,$@}
clean:
${MAKE} dots-clean
${MAKE} dots_local-clean
dots-clean:
rm -f ${foreach p,${DOTS},${DESTDIR}/${p}}
dots-local-clean:
rm -f ${foreach p,${DOTS_LOCAL},${DESTDIR}/${p}}
dots-zwc:
zsh -c "zcompile ${DESTDIR}/.zshrc"
zsh -c "zcompile ${DESTDIR}/.zshenv"
zsh -c "zcompile ${DESTDIR}/.zshrc.linux"
zsh -c "zcompile ${DESTDIR}/.zshrc.freebsd"
zsh -c "zcompile ${DESTDIR}/.zshrc.darwin"
zsh -c "zcompile ${DESTDIR}/.zshrc.local"
dots-zwc-clean:
rm -f ${DESTDIR}/.*.zwc