-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
91 lines (59 loc) · 1.83 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
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
# Dotfiles Make
MERCURIAL_STYLES := dlog nlog sglog slog
SERVER_FILES := cshrc tmux.conf gitconfig
DESKTOP_FILES := conkyrc Xdefaults vimperatorrc
GTK_ICONS_URL := "http://faenza-icon-theme.googlecode.com/files/faenza-icon-theme_1.1.tar.gz"
BUILD := _build
.PHONY: build build-desktop install vim mutt xmonad \
gtk misc-server misc-desktop mercurial mercurial-paths \
mercurial-files termite
build: vim mercurial misc-server
build-desktop: build mutt xmonad termite weechat misc-desktop
clean:
rm -rf $(BUILD)
install:
ifdef DEBUG
diff -urd -x .git -x bundle $(BUILD)/ ~/ | grep -v '^Only in'
else
rsync -crai $(BUILD)/ ~/
endif
# Mercurial
mercurial: mercurial-paths mercurial-files
mercurial-paths:
-[ -d $(BUILD)/.hg ] || mkdir $(BUILD)/.hg
mercurial-files: \
$(foreach mstyle,$(MERCURIAL_STYLES),$(BUILD)/.hg/$(mstyle).style)
$(BUILD)/.hg/%.style :: hg/%.style
cp $? $@
# Mutt rules
mutt: mutt-paths mutt-files
mutt-paths:
-[ -d $(BUILD)/.mutt ] || mkdir $(BUILD)/.mutt
mutt-files: $(BUILD)/.muttrc $(BUILD)/.mutt/account.muttrc $(BUILD)/.mutt/aliases.muttrc
$(BUILD)/.muttrc: muttrc
cp $? $@
$(BUILD)/.mutt/%.muttrc: mutt/%.muttrc
-[ -e $@ ] || cp $? $@
# Xmonad
xmonad: $(BUILD)/.xmonad/xmonad.hs $(BUILD)/.xmobarrc $(BUILD)/.xinitrc \
$(BUILD)/bin/startup-functions.sh
$(BUILD)/.xmonad/xmonad.hs: xmonad/xmonad.hs
-[ -d $(BUILD)/.xmonad ] || mkdir $(BUILD)/.xmonad
cp $? $@
$(BUILD)/.xmobarrc: xmobarrc
cp $? $@
$(BUILD)/.xinitrc: xinitrc
cp $? $@
# Misc
server_files_base := $(foreach file,$(SERVER_FILES),$(BUILD)/.$(file))
desktop_files_base := $(foreach file,$(DESKTOP_FILES),$(BUILD)/.$(file))
misc-server: $(server_files_base)
misc-desktop: $(desktop_files_base)
$(BUILD)/.% :: %
cp $? $@
include mk/tools.mk
include mk/gtk.mk
include mk/vim.mk
include mk/termite.mk
include mk/weechat.mk
include mk/redshift.mk