masqmail

diff 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
line diff
     1.1 --- a/Makefile.am	Thu Jul 08 00:08:18 2010 +0200
     1.2 +++ b/Makefile.am	Thu Jul 08 00:26:55 2010 +0200
     1.3 @@ -7,22 +7,21 @@
     1.4  uninstall-local: rm-rmail rm-doc_dir rm-tpl_dir rm-conf_dir rm-run_dir rm-spool_dir rm-log_dir
     1.5  
     1.6  
     1.7 -conf_dir: $(DESTDIR)@with_confdir@
     1.8 -
     1.9 -$(DESTDIR)@with_confdir@:
    1.10 +conf_dir:
    1.11  	install -d $(DESTDIR)@with_confdir@
    1.12  
    1.13  rm-conf_dir:
    1.14  	rmdir $(DESTDIR)@with_confdir@  # removes only if empty
    1.15  
    1.16  
    1.17 -tpl_dir: $(DESTDIR)@datadir@/tpl
    1.18 -
    1.19 -$(DESTDIR)@datadir@/tpl: conf_dir
    1.20 +tpl_dir:
    1.21  	install -d $(DESTDIR)@datadir@/masqmail/tpl
    1.22  	cp tpl/* $(DESTDIR)@datadir@/masqmail/tpl
    1.23  	chmod 644 $(DESTDIR)@datadir@/masqmail/tpl/*
    1.24  
    1.25 +rm-tpl_dir:
    1.26 +	rm -rf $(DESTDIR)@datadir@/masqmail/
    1.27 +
    1.28  
    1.29  doc_dir:
    1.30  	install -d $(DESTDIR)@docdir@
    1.31 @@ -30,9 +29,12 @@
    1.32  	cp -r examples $(DESTDIR)@docdir@
    1.33  	cp ChangeLog NEWS AUTHORS COPYING README TODO $(DESTDIR)@docdir@
    1.34  
    1.35 -
    1.36 -uid_bit: $(DESTDIR)@prefix@/sbin/masqmail
    1.37 -	chmod u+s $(DESTDIR)@prefix@/sbin/masqmail
    1.38 +rm-doc_dir:
    1.39 +	cd $(DESTDIR)@docdir@ && ( \
    1.40 +	    rm -rf docs examples ; \
    1.41 +	    rm -f ChangeLog NEWS AUTHORS COPYING README TODO ; \
    1.42 +	)
    1.43 +	rmdir $(DESTDIR)@docdir@
    1.44  
    1.45  
    1.46  run_dir:
    1.47 @@ -42,22 +44,14 @@
    1.48  	rm -rf $(DESTDIR)/var/run/masqmail
    1.49  
    1.50  
    1.51 -log_dir: $(DESTDIR)@with_logdir@
    1.52 -
    1.53 -$(DESTDIR)@with_logdir@:
    1.54 -	[ -d `dirname $(DESTDIR)@with_logdir@` ] || \
    1.55 -		install -d `dirname $(DESTDIR)@with_logdir@`
    1.56 +log_dir:
    1.57  	install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_logdir@
    1.58  
    1.59  rm-log_dir:
    1.60  	rmdir $(DESTDIR)@with_logdir@  # removes only if empty
    1.61  
    1.62  
    1.63 -spool_dir: $(DESTDIR)@with_spooldir@
    1.64 -
    1.65 -$(DESTDIR)@with_spooldir@:
    1.66 -	[ -d `dirname $(DESTDIR)@with_spooldir@` ] || \
    1.67 -		install -d `dirname $(DESTDIR)@with_spooldir@`
    1.68 +spool_dir:
    1.69  	install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_spooldir@
    1.70  	install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_spooldir@/lock
    1.71  	install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_spooldir@/input
    1.72 @@ -80,12 +74,6 @@
    1.73  rm-rmail:
    1.74  	rm -f $(DESTDIR)@prefix@/bin/rmail
    1.75  
    1.76 -rm-doc_dir:
    1.77 -	cd $(DESTDIR)@docdir@ && ( \
    1.78 -	    rm -rf docs examples ; \
    1.79 -	    rm -f ChangeLog NEWS AUTHORS COPYING README TODO ; \
    1.80 -	)
    1.81 -	rmdir $(DESTDIR)@docdir@
    1.82  
    1.83 -rm-tpl_dir:
    1.84 -	rm -rf $(DESTDIR)@datadir@/masqmail/
    1.85 +uid_bit: $(DESTDIR)@prefix@/sbin/masqmail
    1.86 +	chmod u+s $(DESTDIR)@prefix@/sbin/masqmail