-
Notifications
You must be signed in to change notification settings - Fork 0
/
Makefile
48 lines (40 loc) · 1.33 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
DESTDIR = /
INSTALL = install
INSTALL_PROGRAM = $(INSTALL) -m 755
INSTALL_DATA = $(INSTALL) -m 644
INSTALL_DIR = $(INSTALL) -d
UNINSTALL_PROGRAM = rm
UNINSTALL_DATA = rm
UNINSTALL_DIR = rmdir -p --ignore-fail-on-non-empty
COMPILE_DATA = pycompile
binary_f = tavu-listen
conf_f = tavurc
share_f = dotfile.skel
dest_binary_d = $(DESTDIR)/usr/bin
dest_conf_d = $(DESTDIR)/etc
dest_doc_d = $(DESTDIR)/usr/share/doc/tavu
dest_share_d = $(DESTDIR)/usr/share/tavu
dest_mod_d = $(DESTDIR)/usr/share/tavu/python
all:
install: prog-install doc-install
prog-install:
$(INSTALL_DIR) $(dest_binary_d) $(dest_conf_d) $(dest_share_d) $(dest_mod_d)
$(INSTALL_PROGRAM) $(binary_f) $(dest_binary_d)
$(INSTALL_DATA) $(conf_f) $(dest_conf_d)
$(INSTALL_DATA) $(share_f) $(dest_share_d)
$(INSTALL_DATA) python/*.py $(dest_mod_d)
$(COMPILE_DATA) $(dest_mod_d)/*.py
doc-install:
$(INSTALL_DIR) $(dest_doc_d)
$(INSTALL_DATA) doc/* $(dest_doc_d)
uninstall:
- $(UNINSTALL_PROGRAM) $(dest_binary_d)/$(binary_f)
- $(UNINSTALL_DATA) $(dest_doc_d)/*
- $(UNINSTALL_DATA) $(dest_mod_d)/*.pyc
- $(UNINSTALL_DATA) $(dest_mod_d)/*.py
- $(UNINSTALL_DIR) $(dest_mod_d)
- $(UNINSTALL_DATA) $(dest_share_d)/$(share_f)
- $(UNINSTALL_DIR) $(dest_binary_d) $(dest_conf_d) $(dest_doc_d) \
$(dest_share_d)
purge: uninstall
- $(UNINSTALL_DATA) $(dest_conf_d)/$(conf_f)