Mercurial > masqmail-0.2
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 (2010-07-07) |
parents | 89467037cb36 |
children | 88dab0d22341 |
files | Makefile.am Makefile.in |
diffstat | 2 files changed, 33 insertions(+), 2 deletions(-) [+] |
line wrap: on
line diff
--- a/Makefile.am Wed Jul 07 23:37:49 2010 +0200 +++ b/Makefile.am Wed Jul 07 23:43:05 2010 +0200 @@ -4,7 +4,7 @@ install-data-local: log_dir spool_dir uid_bit conf_dir tpl_dir run_dir doc_dir rmail -uninstall-local: rm-rmail rm-doc_dir rm-tpl_dir +uninstall-local: rm-rmail rm-doc_dir rm-tpl_dir rm-conf_dir rm-run_dir rm-spool_dir rm-log_dir conf_dir: $(DESTDIR)@with_confdir@ @@ -12,6 +12,9 @@ $(DESTDIR)@with_confdir@: install -d $(DESTDIR)@with_confdir@ +rm-conf_dir: + rmdir $(DESTDIR)@with_confdir@ # removes only if empty + tpl_dir: $(DESTDIR)@datadir@/tpl @@ -35,6 +38,8 @@ run_dir: install -d -o @with_user@ -g @with_group@ $(DESTDIR)/var/run/masqmail +rm-run_dir: + rm -rf $(DESTDIR)/var/run/masqmail log_dir: $(DESTDIR)@with_logdir@ @@ -44,6 +49,8 @@ install -d `dirname $(DESTDIR)@with_logdir@` install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_logdir@ +rm-log_dir: + rmdir $(DESTDIR)@with_logdir@ # removes only if empty spool_dir: $(DESTDIR)@with_spooldir@ @@ -56,6 +63,13 @@ install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_spooldir@/input install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_spooldir@/popuidl +rm-spool_dir: + : # removal fails if the dirs are non-empty + : # this prevents losing spooled files + rmdir $(DESTDIR)@with_spooldir@/lock + rmdir $(DESTDIR)@with_spooldir@/input + rmdir $(DESTDIR)@with_spooldir@/popuidl + rmdir $(DESTDIR)@with_spooldir@ rmail: [ -d "$(DESTDIR)@prefix@/bin" ] || mkdir -p "$(DESTDIR)@prefix@/bin"
--- a/Makefile.in Wed Jul 07 23:37:49 2010 +0200 +++ b/Makefile.in Wed Jul 07 23:43:05 2010 +0200 @@ -693,13 +693,16 @@ install-data-local: log_dir spool_dir uid_bit conf_dir tpl_dir run_dir doc_dir rmail -uninstall-local: rm-rmail rm-doc_dir rm-tpl_dir +uninstall-local: rm-rmail rm-doc_dir rm-tpl_dir rm-conf_dir rm-run_dir rm-spool_dir rm-log_dir conf_dir: $(DESTDIR)@with_confdir@ $(DESTDIR)@with_confdir@: install -d $(DESTDIR)@with_confdir@ +rm-conf_dir: + rmdir $(DESTDIR)@with_confdir@ # removes only if empty + tpl_dir: $(DESTDIR)@datadir@/tpl $(DESTDIR)@datadir@/tpl: conf_dir @@ -719,6 +722,9 @@ run_dir: install -d -o @with_user@ -g @with_group@ $(DESTDIR)/var/run/masqmail +rm-run_dir: + rm -rf $(DESTDIR)/var/run/masqmail + log_dir: $(DESTDIR)@with_logdir@ $(DESTDIR)@with_logdir@: @@ -726,6 +732,9 @@ install -d `dirname $(DESTDIR)@with_logdir@` install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_logdir@ +rm-log_dir: + rmdir $(DESTDIR)@with_logdir@ # removes only if empty + spool_dir: $(DESTDIR)@with_spooldir@ $(DESTDIR)@with_spooldir@: @@ -736,6 +745,14 @@ install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_spooldir@/input install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_spooldir@/popuidl +rm-spool_dir: + : # removal fails if the dirs are non-empty + : # this prevents losing spooled files + rmdir $(DESTDIR)@with_spooldir@/lock + rmdir $(DESTDIR)@with_spooldir@/input + rmdir $(DESTDIR)@with_spooldir@/popuidl + rmdir $(DESTDIR)@with_spooldir@ + rmail: [ -d "$(DESTDIR)@prefix@/bin" ] || mkdir -p "$(DESTDIR)@prefix@/bin" sed '/^SENDMAIL/s,/usr/sbin/sendmail,$(DESTDIR)@prefix@/sbin/masqmail,'\