comparison Makefile.am @ 147:cb42157b3520

improved the Makefile (check diff for details)
author meillo@marmaro.de
date Thu, 08 Jul 2010 00:26:55 +0200
parents 88dab0d22341
children 1db6e1b91ead
comparison
equal deleted inserted replaced
146:88dab0d22341 147:cb42157b3520
5 install-data-local: log_dir spool_dir uid_bit conf_dir tpl_dir run_dir doc_dir rmail 5 install-data-local: log_dir spool_dir uid_bit conf_dir tpl_dir run_dir doc_dir rmail
6 6
7 uninstall-local: rm-rmail rm-doc_dir rm-tpl_dir rm-conf_dir rm-run_dir rm-spool_dir rm-log_dir 7 uninstall-local: rm-rmail rm-doc_dir rm-tpl_dir rm-conf_dir rm-run_dir rm-spool_dir rm-log_dir
8 8
9 9
10 conf_dir: $(DESTDIR)@with_confdir@ 10 conf_dir:
11
12 $(DESTDIR)@with_confdir@:
13 install -d $(DESTDIR)@with_confdir@ 11 install -d $(DESTDIR)@with_confdir@
14 12
15 rm-conf_dir: 13 rm-conf_dir:
16 rmdir $(DESTDIR)@with_confdir@ # removes only if empty 14 rmdir $(DESTDIR)@with_confdir@ # removes only if empty
17 15
18 16
19 tpl_dir: $(DESTDIR)@datadir@/tpl 17 tpl_dir:
20
21 $(DESTDIR)@datadir@/tpl: conf_dir
22 install -d $(DESTDIR)@datadir@/masqmail/tpl 18 install -d $(DESTDIR)@datadir@/masqmail/tpl
23 cp tpl/* $(DESTDIR)@datadir@/masqmail/tpl 19 cp tpl/* $(DESTDIR)@datadir@/masqmail/tpl
24 chmod 644 $(DESTDIR)@datadir@/masqmail/tpl/* 20 chmod 644 $(DESTDIR)@datadir@/masqmail/tpl/*
21
22 rm-tpl_dir:
23 rm -rf $(DESTDIR)@datadir@/masqmail/
25 24
26 25
27 doc_dir: 26 doc_dir:
28 install -d $(DESTDIR)@docdir@ 27 install -d $(DESTDIR)@docdir@
29 cp -r docs $(DESTDIR)@docdir@ 28 cp -r docs $(DESTDIR)@docdir@
30 cp -r examples $(DESTDIR)@docdir@ 29 cp -r examples $(DESTDIR)@docdir@
31 cp ChangeLog NEWS AUTHORS COPYING README TODO $(DESTDIR)@docdir@ 30 cp ChangeLog NEWS AUTHORS COPYING README TODO $(DESTDIR)@docdir@
32 31
33 32 rm-doc_dir:
34 uid_bit: $(DESTDIR)@prefix@/sbin/masqmail 33 cd $(DESTDIR)@docdir@ && ( \
35 chmod u+s $(DESTDIR)@prefix@/sbin/masqmail 34 rm -rf docs examples ; \
35 rm -f ChangeLog NEWS AUTHORS COPYING README TODO ; \
36 )
37 rmdir $(DESTDIR)@docdir@
36 38
37 39
38 run_dir: 40 run_dir:
39 install -d -o @with_user@ -g @with_group@ $(DESTDIR)/var/run/masqmail 41 install -d -o @with_user@ -g @with_group@ $(DESTDIR)/var/run/masqmail
40 42
41 rm-run_dir: 43 rm-run_dir:
42 rm -rf $(DESTDIR)/var/run/masqmail 44 rm -rf $(DESTDIR)/var/run/masqmail
43 45
44 46
45 log_dir: $(DESTDIR)@with_logdir@ 47 log_dir:
46
47 $(DESTDIR)@with_logdir@:
48 [ -d `dirname $(DESTDIR)@with_logdir@` ] || \
49 install -d `dirname $(DESTDIR)@with_logdir@`
50 install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_logdir@ 48 install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_logdir@
51 49
52 rm-log_dir: 50 rm-log_dir:
53 rmdir $(DESTDIR)@with_logdir@ # removes only if empty 51 rmdir $(DESTDIR)@with_logdir@ # removes only if empty
54 52
55 53
56 spool_dir: $(DESTDIR)@with_spooldir@ 54 spool_dir:
57
58 $(DESTDIR)@with_spooldir@:
59 [ -d `dirname $(DESTDIR)@with_spooldir@` ] || \
60 install -d `dirname $(DESTDIR)@with_spooldir@`
61 install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_spooldir@ 55 install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_spooldir@
62 install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_spooldir@/lock 56 install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_spooldir@/lock
63 install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_spooldir@/input 57 install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_spooldir@/input
64 install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_spooldir@/popuidl 58 install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_spooldir@/popuidl
65 59
78 chmod 755 $(DESTDIR)@prefix@/bin/rmail 72 chmod 755 $(DESTDIR)@prefix@/bin/rmail
79 73
80 rm-rmail: 74 rm-rmail:
81 rm -f $(DESTDIR)@prefix@/bin/rmail 75 rm -f $(DESTDIR)@prefix@/bin/rmail
82 76
83 rm-doc_dir:
84 cd $(DESTDIR)@docdir@ && ( \
85 rm -rf docs examples ; \
86 rm -f ChangeLog NEWS AUTHORS COPYING README TODO ; \
87 )
88 rmdir $(DESTDIR)@docdir@
89 77
90 rm-tpl_dir: 78 uid_bit: $(DESTDIR)@prefix@/sbin/masqmail
91 rm -rf $(DESTDIR)@datadir@/masqmail/ 79 chmod u+s $(DESTDIR)@prefix@/sbin/masqmail