masqmail-0.2
diff Makefile.am @ 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 | 6eec8bcfd320 |
children | 88dab0d22341 |
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"