Mercurial > masqmail
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 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"