-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathMakefile
110 lines (82 loc) · 1.93 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
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
.PHONY: all \
config man bin \
bash tmux git manpath_file vim ssh \
cron install-gnss \
octave test \
install-man
# use make diff=1 to show diff
ifdef diff
c = diff $< $@ || true
endif
ifdef touch
c = touch $@
endif
c ?= cp $(BACKUP) $< $@
cf ?= cp $< $@
i = install $(BACKUP) $< $@
BACKUP = --backup
XDG_CONFIG_HOME ?= $(HOME)/.config
all: config bin # man
config: bash tmux git vim ssh
bash: $(HOME)/.bashrc $(HOME)/.profile $(HOME)/.bash_function $(HOME)/.inputrc
tmux: $(HOME)/.tmux.conf
git: $(XDG_CONFIG_HOME)/git/config $(XDG_CONFIG_HOME)/git/ignore
vim: $(HOME)/.vimrc
ssh: $(HOME)/.ssh/config
octave: $(HOME)/.octaverc
link: $(HOME)/gvfs $(HOME)/media
$(HOME)/gvfs:
ln -s /run/user/`id -u`/gvfs $@
$(HOME)/media:
ln -s /media/$(USER) $@
$(XDG_CONFIG_HOME)/git/%: git/% $(XDG_CONFIG_HOME)/git
$c
$(XDG_CONFIG_HOME)/git:
mkdir -p $@
$(HOME)/.octaverc: octave/octaverc
$c
$(HOME)/.ssh/config: ssh/config
$c
$(HOME)/.%: %
$c
man: man/Makefile $(HOME)/.manpath
$(MAKE) -C $@
bin:
$(MAKE) -C $@
ime: supcj.scim supcj-cn.scim
cp $^ $(HOME)/.scim/user-tables
supcj.gtab: supcj.cin
gcin2tab supcj.cin
supcj-cn.gtab: supcj.cin
cconv -f UTF8 -t UTF8-CN -o supcj-cn.cin supcj.cin
gcin2tab supcj-cn.cin
supcj.scim: supcj.cin
sh [email protected] >$@
supcj-cn.scim: supcj.scim
sh [email protected] >$@
/etc/X11/xorg.conf.d/56-evdev-trackpoint-gholk.conf: evdev-trackpoint-gholk.conf
$(cf)
/etc/sudoers.d/gholk-csa-sudo-conf: gholk-csa-sudo-conf
cp $< $@
chmod 0440 $@
$(HOME)/.local/share/anacron/anacrontab: anacrontab
$c
/etc/sysctl.d/local.conf: local-sysctl.conf
$c
/etc/X11/xorg.conf.d/20-intel-tearfree.conf: intel-tearfree.conf
$(cf)
cron: crontab
crontab < $<
install-gnss:
cd gnss; \
for script in *; \
do \
case $$script in \
bashrc.sh) cp $$script $(HOME)/.local/bin/gnss-rc ;; \
*~) true ;; \
*) install $$script \
$(HOME)/.local/bin/$$(echo $$script | sed -r 's/\..*?$$//') ;; \
esac; \
done
install-man:
$(MAKE) -C man install