forked from alibaba/tsar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMakefile
45 lines (40 loc) · 1.12 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
DIRS = modules src
all:
for i in $(DIRS); do make -C $$i; done
clean:
for i in $(DIRS); do cd $$i;make clean;cd ..; done
install:
#mkdir for tsar
mkdir -p /usr/local/tsar/modules
mkdir -p /etc/tsar
mkdir -p /usr/local/man/man8/
#copy tsar shared so
cp modules/*.so /usr/local/tsar/modules
#copy bin file
cp src/tsar /usr/bin/tsar
#copy config file
cp conf/tsar.conf /etc/tsar/tsar.conf
cp conf/tsar.logrotate /etc/logrotate.d/tsar
cp conf/tsar.cron /etc/cron.d/tsar
#copy man file
cp conf/tsar.8 /usr/local/man/man8/
tsardevel:
mkdir -p /usr/local/tsar/devel
cp devel/mod_test.c /usr/local/tsar/devel/mod_test.c
cp devel/mod_test.conf /usr/local/tsar/devel/mod_test.conf
cp devel/tsar.h /usr/local/tsar/devel/tsar.h
cp devel/Makefile.test /usr/local/tsar/devel/Makefile.test
cp devel/tsardevel /usr/bin/tsardevel
uninstall:
#rm tsar
rm -rf /usr/local/tsar
rm -rf /etc/tsar/cron.d
rm -f /etc/logrotate.d/tsar
rm -f /etc/cron.d/tsar
rm -f /usr/local/man/man8/tsar.8
#rm tsar
rm -f /usr/bin/tsar
#rm tsardevel
rm -f /usr/bin/tsardevel
#backup configure file
mv /etc/tsar/tsar.conf /etc/tsar/tsar.conf.rpmsave