masqmail
changeset 145:e68d8752735a
remove all installed dirs on `make uninstall'
but no generated data
remove log_dir, conf_dir, spool_dir if empty
remove run_dir in any case
author | meillo@marmaro.de |
---|---|
date | Wed, 07 Jul 2010 23:43:05 +0200 |
parents | 89467037cb36 |
children | 88dab0d22341 |
files | Makefile.am Makefile.in |
diffstat | 2 files changed, 33 insertions(+), 2 deletions(-) [+] |
line diff
1.1 --- a/Makefile.am Wed Jul 07 23:37:49 2010 +0200 1.2 +++ b/Makefile.am Wed Jul 07 23:43:05 2010 +0200 1.3 @@ -4,7 +4,7 @@ 1.4 1.5 install-data-local: log_dir spool_dir uid_bit conf_dir tpl_dir run_dir doc_dir rmail 1.6 1.7 -uninstall-local: rm-rmail rm-doc_dir rm-tpl_dir 1.8 +uninstall-local: rm-rmail rm-doc_dir rm-tpl_dir rm-conf_dir rm-run_dir rm-spool_dir rm-log_dir 1.9 1.10 1.11 conf_dir: $(DESTDIR)@with_confdir@ 1.12 @@ -12,6 +12,9 @@ 1.13 $(DESTDIR)@with_confdir@: 1.14 install -d $(DESTDIR)@with_confdir@ 1.15 1.16 +rm-conf_dir: 1.17 + rmdir $(DESTDIR)@with_confdir@ # removes only if empty 1.18 + 1.19 1.20 tpl_dir: $(DESTDIR)@datadir@/tpl 1.21 1.22 @@ -35,6 +38,8 @@ 1.23 run_dir: 1.24 install -d -o @with_user@ -g @with_group@ $(DESTDIR)/var/run/masqmail 1.25 1.26 +rm-run_dir: 1.27 + rm -rf $(DESTDIR)/var/run/masqmail 1.28 1.29 1.30 log_dir: $(DESTDIR)@with_logdir@ 1.31 @@ -44,6 +49,8 @@ 1.32 install -d `dirname $(DESTDIR)@with_logdir@` 1.33 install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_logdir@ 1.34 1.35 +rm-log_dir: 1.36 + rmdir $(DESTDIR)@with_logdir@ # removes only if empty 1.37 1.38 1.39 spool_dir: $(DESTDIR)@with_spooldir@ 1.40 @@ -56,6 +63,13 @@ 1.41 install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_spooldir@/input 1.42 install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_spooldir@/popuidl 1.43 1.44 +rm-spool_dir: 1.45 + : # removal fails if the dirs are non-empty 1.46 + : # this prevents losing spooled files 1.47 + rmdir $(DESTDIR)@with_spooldir@/lock 1.48 + rmdir $(DESTDIR)@with_spooldir@/input 1.49 + rmdir $(DESTDIR)@with_spooldir@/popuidl 1.50 + rmdir $(DESTDIR)@with_spooldir@ 1.51 1.52 rmail: 1.53 [ -d "$(DESTDIR)@prefix@/bin" ] || mkdir -p "$(DESTDIR)@prefix@/bin"
2.1 --- a/Makefile.in Wed Jul 07 23:37:49 2010 +0200 2.2 +++ b/Makefile.in Wed Jul 07 23:43:05 2010 +0200 2.3 @@ -693,13 +693,16 @@ 2.4 2.5 install-data-local: log_dir spool_dir uid_bit conf_dir tpl_dir run_dir doc_dir rmail 2.6 2.7 -uninstall-local: rm-rmail rm-doc_dir rm-tpl_dir 2.8 +uninstall-local: rm-rmail rm-doc_dir rm-tpl_dir rm-conf_dir rm-run_dir rm-spool_dir rm-log_dir 2.9 2.10 conf_dir: $(DESTDIR)@with_confdir@ 2.11 2.12 $(DESTDIR)@with_confdir@: 2.13 install -d $(DESTDIR)@with_confdir@ 2.14 2.15 +rm-conf_dir: 2.16 + rmdir $(DESTDIR)@with_confdir@ # removes only if empty 2.17 + 2.18 tpl_dir: $(DESTDIR)@datadir@/tpl 2.19 2.20 $(DESTDIR)@datadir@/tpl: conf_dir 2.21 @@ -719,6 +722,9 @@ 2.22 run_dir: 2.23 install -d -o @with_user@ -g @with_group@ $(DESTDIR)/var/run/masqmail 2.24 2.25 +rm-run_dir: 2.26 + rm -rf $(DESTDIR)/var/run/masqmail 2.27 + 2.28 log_dir: $(DESTDIR)@with_logdir@ 2.29 2.30 $(DESTDIR)@with_logdir@: 2.31 @@ -726,6 +732,9 @@ 2.32 install -d `dirname $(DESTDIR)@with_logdir@` 2.33 install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_logdir@ 2.34 2.35 +rm-log_dir: 2.36 + rmdir $(DESTDIR)@with_logdir@ # removes only if empty 2.37 + 2.38 spool_dir: $(DESTDIR)@with_spooldir@ 2.39 2.40 $(DESTDIR)@with_spooldir@: 2.41 @@ -736,6 +745,14 @@ 2.42 install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_spooldir@/input 2.43 install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_spooldir@/popuidl 2.44 2.45 +rm-spool_dir: 2.46 + : # removal fails if the dirs are non-empty 2.47 + : # this prevents losing spooled files 2.48 + rmdir $(DESTDIR)@with_spooldir@/lock 2.49 + rmdir $(DESTDIR)@with_spooldir@/input 2.50 + rmdir $(DESTDIR)@with_spooldir@/popuidl 2.51 + rmdir $(DESTDIR)@with_spooldir@ 2.52 + 2.53 rmail: 2.54 [ -d "$(DESTDIR)@prefix@/bin" ] || mkdir -p "$(DESTDIR)@prefix@/bin" 2.55 sed '/^SENDMAIL/s,/usr/sbin/sendmail,$(DESTDIR)@prefix@/sbin/masqmail,'\