changeset 147:cb42157b3520

improved the Makefile (check diff for details)
author meillo@marmaro.de
date Thu, 08 Jul 2010 00:26:55 +0200 (2010-07-07)
parents 88dab0d22341
children 1db6e1b91ead
files Makefile.am Makefile.in
diffstat 2 files changed, 30 insertions(+), 54 deletions(-) [+]
line wrap: on
line diff
--- a/Makefile.am	Thu Jul 08 00:08:18 2010 +0200
+++ b/Makefile.am	Thu Jul 08 00:26:55 2010 +0200
@@ -7,22 +7,21 @@
 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@:
+conf_dir:
 	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
+tpl_dir:
 	install -d $(DESTDIR)@datadir@/masqmail/tpl
 	cp tpl/* $(DESTDIR)@datadir@/masqmail/tpl
 	chmod 644 $(DESTDIR)@datadir@/masqmail/tpl/*
 
+rm-tpl_dir:
+	rm -rf $(DESTDIR)@datadir@/masqmail/
+
 
 doc_dir:
 	install -d $(DESTDIR)@docdir@
@@ -30,9 +29,12 @@
 	cp -r examples $(DESTDIR)@docdir@
 	cp ChangeLog NEWS AUTHORS COPYING README TODO $(DESTDIR)@docdir@
 
-
-uid_bit: $(DESTDIR)@prefix@/sbin/masqmail
-	chmod u+s $(DESTDIR)@prefix@/sbin/masqmail
+rm-doc_dir:
+	cd $(DESTDIR)@docdir@ && ( \
+	    rm -rf docs examples ; \
+	    rm -f ChangeLog NEWS AUTHORS COPYING README TODO ; \
+	)
+	rmdir $(DESTDIR)@docdir@
 
 
 run_dir:
@@ -42,22 +44,14 @@
 	rm -rf $(DESTDIR)/var/run/masqmail
 
 
-log_dir: $(DESTDIR)@with_logdir@
-
-$(DESTDIR)@with_logdir@:
-	[ -d `dirname $(DESTDIR)@with_logdir@` ] || \
-		install -d `dirname $(DESTDIR)@with_logdir@`
+log_dir:
 	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@:
-	[ -d `dirname $(DESTDIR)@with_spooldir@` ] || \
-		install -d `dirname $(DESTDIR)@with_spooldir@`
+spool_dir:
 	install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_spooldir@
 	install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_spooldir@/lock
 	install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_spooldir@/input
@@ -80,12 +74,6 @@
 rm-rmail:
 	rm -f $(DESTDIR)@prefix@/bin/rmail
 
-rm-doc_dir:
-	cd $(DESTDIR)@docdir@ && ( \
-	    rm -rf docs examples ; \
-	    rm -f ChangeLog NEWS AUTHORS COPYING README TODO ; \
-	)
-	rmdir $(DESTDIR)@docdir@
 
-rm-tpl_dir:
-	rm -rf $(DESTDIR)@datadir@/masqmail/
+uid_bit: $(DESTDIR)@prefix@/sbin/masqmail
+	chmod u+s $(DESTDIR)@prefix@/sbin/masqmail
--- a/Makefile.in	Thu Jul 08 00:08:18 2010 +0200
+++ b/Makefile.in	Thu Jul 08 00:26:55 2010 +0200
@@ -695,29 +695,32 @@
 
 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@:
+conf_dir:
 	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
+tpl_dir:
 	install -d $(DESTDIR)@datadir@/masqmail/tpl
 	cp tpl/* $(DESTDIR)@datadir@/masqmail/tpl
 	chmod 644 $(DESTDIR)@datadir@/masqmail/tpl/*
 
+rm-tpl_dir:
+	rm -rf $(DESTDIR)@datadir@/masqmail/
+
 doc_dir:
 	install -d $(DESTDIR)@docdir@
 	cp -r docs $(DESTDIR)@docdir@
 	cp -r examples $(DESTDIR)@docdir@
 	cp ChangeLog NEWS AUTHORS COPYING README TODO $(DESTDIR)@docdir@
 
-uid_bit: $(DESTDIR)@prefix@/sbin/masqmail
-	chmod u+s $(DESTDIR)@prefix@/sbin/masqmail
+rm-doc_dir:
+	cd $(DESTDIR)@docdir@ && ( \
+	    rm -rf docs examples ; \
+	    rm -f ChangeLog NEWS AUTHORS COPYING README TODO ; \
+	)
+	rmdir $(DESTDIR)@docdir@
 
 run_dir:
 	install -d -o @with_user@ -g @with_group@ $(DESTDIR)/var/run/masqmail
@@ -725,21 +728,13 @@
 rm-run_dir:
 	rm -rf $(DESTDIR)/var/run/masqmail
 
-log_dir: $(DESTDIR)@with_logdir@
-
-$(DESTDIR)@with_logdir@:
-	[ -d `dirname $(DESTDIR)@with_logdir@` ] || \
-		install -d `dirname $(DESTDIR)@with_logdir@`
+log_dir:
 	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@:
-	[ -d `dirname $(DESTDIR)@with_spooldir@` ] || \
-		install -d `dirname $(DESTDIR)@with_spooldir@`
+spool_dir:
 	install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_spooldir@
 	install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_spooldir@/lock
 	install -d -o @with_user@ -g @with_group@ $(DESTDIR)@with_spooldir@/input
@@ -762,15 +757,8 @@
 rm-rmail:
 	rm -f $(DESTDIR)@prefix@/bin/rmail
 
-rm-doc_dir:
-	cd $(DESTDIR)@docdir@ && ( \
-	    rm -rf docs examples ; \
-	    rm -f ChangeLog NEWS AUTHORS COPYING README TODO ; \
-	)
-	rmdir $(DESTDIR)@docdir@
-
-rm-tpl_dir:
-	rm -rf $(DESTDIR)@datadir@/masqmail/
+uid_bit: $(DESTDIR)@prefix@/sbin/masqmail
+	chmod u+s $(DESTDIR)@prefix@/sbin/masqmail
 
 # Tell versions [3.59,3.63) of GNU make to not export all variables.
 # Otherwise a system limit (for SysV at least) may be exceeded.