New make targets clean, distclean, check, dist, and distcheck
authorAlexander Barton <alex@barton.de>
Mon, 14 Dec 2009 10:13:00 +0000 (11:13 +0100)
committerAlexander Barton <alex@barton.de>
Mon, 14 Dec 2009 10:13:00 +0000 (11:13 +0100)
Makefile

index 6835bdb..aef74d5 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -5,6 +5,11 @@
 
 all:
 
+clean:
+       find . -name .DS_Store -delete
+
+distclean: clean
+
 install:
        @echo " ** Use make targets 'install-client', 'install-server' and 'install-all'"
        @echo " ** to install client and/or server components!"
@@ -46,10 +51,19 @@ install-client:
        [ -r contrib/Makefile.`uname` ] \
                && make -f contrib/Makefile.`uname` "install-client" || true
 
+check:
+
+dist: distclean
+       dir=`basename $${PWD}` \
+        && cd .. \
+        && tar cvzf "$${dir}.tar.gz" --exclude .git "$${dir}"
+
+distcheck: check dist
+
 nagcollecttestscripts:
        tar -czvf nagcollecttestscripts.tgz -C client/lib/tests .
 
 .PHONY: all install install-all install-server install-client \
-       nagcollecttestscripts
+       clean distclean check dist distcheck nagcollecttestscripts
 
 # -eof-