]> gitweb.michael.orlitzky.com - postfix-logwatch.git/blobdiff - Makefile
Changes: add the one change in v1.40.05.
[postfix-logwatch.git] / Makefile
index 089a7e7946fc49d68a55e8b6b69e562ff57f7faa..2d87025ae7c711ca2f4a87e8fc8de07ef7120a21 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -5,8 +5,7 @@ src = $(program) \
       $(program).conf \
       $(program).conf-topn \
       $(program).1 \
-      $(program).1.html \
-      Changes Bugs Makefile README LICENSE
+      Changes Bugs README LICENSE
 
 prefix_logwatch = /etc/logwatch
 prefix_standalone = /usr/local
@@ -19,8 +18,6 @@ scriptdir_standalone = $(prefix_standalone)/bin
 confdir_standalone   = $(prefix_standalone)/etc
 mandir_standalone    = $(prefix_standalone)/man/man1
 
-toolsdir             = ../tools
-
 INSTALL = /usr/bin/install -c
 
 install:
@@ -29,41 +26,58 @@ install:
        @echo 'Run "make install-all" to install both'
 
 install-logwatch:
-       $(INSTALL) -d -m 0755 $(DESTDIR)$(scriptdir_logwatch) $(DESTDIR)$(confdir_logwatch) || exit 1;
-       $(INSTALL) -m 0644 $(program) $(DESTDIR)$(scriptdir_logwatch)/$(program_logwatch) || exit 1;
-       $(INSTALL) -m 0644 $(program).conf $(DESTDIR)$(confdir_logwatch)/$(program_logwatch).conf || exit 1;
+       $(INSTALL) -d -m 0755 \
+          $(DESTDIR)$(scriptdir_logwatch) \
+          $(DESTDIR)$(confdir_logwatch)
+       $(INSTALL) -m 0644 \
+          $(program) \
+          $(DESTDIR)$(scriptdir_logwatch)/$(program_logwatch)
+       $(INSTALL) -m 0644 \
+          $(program).conf \
+          $(DESTDIR)$(confdir_logwatch)/$(program_logwatch).conf
        # removes taint mode (-T) to run under logwatch
-       perl -e 'while (<>) { $$.==1 and s/\s+-T$$//; print "$$_";}' -i $(DESTDIR)$(scriptdir_logwatch)/$(program_logwatch)
+       perl -e 'while (<>) { $$.==1 and s/\s+-T$$//; print "$$_";}' \
+             -i $(DESTDIR)$(scriptdir_logwatch)/$(program_logwatch)
 
 install-standalone:
-       $(INSTALL) -d -m 0755 $(DESTDIR)$(scriptdir_standalone) $(DESTDIR)$(confdir_standalone) || exit 1;
-       $(INSTALL) -m 0755 $(program) $(DESTDIR)$(scriptdir_standalone)/$(program) || exit 1;
-       $(INSTALL) -m 0644 $(program).conf $(DESTDIR)$(confdir_standalone)/$(program).conf || exit 1;
-       $(INSTALL) -m 0644 $(program).1 $(DESTDIR)$(mandir_standalone)/$(program).1 || exit 1;
+       $(INSTALL) -d -m 0755 \
+          $(DESTDIR)$(scriptdir_standalone) \
+          $(DESTDIR)$(confdir_standalone) \
+          $(DESTDIR)$(mandir_standalone)
+       $(INSTALL) -m 0755 \
+          $(program) \
+          $(DESTDIR)$(scriptdir_standalone)/$(program)
+       $(INSTALL) -m 0644 \
+          $(program).conf \
+          $(DESTDIR)$(confdir_standalone)/$(program).conf
+       $(INSTALL) -m 0644 \
+          $(program).1 \
+          $(DESTDIR)$(mandir_standalone)/$(program).1
 
 install-all: install-logwatch install-standalone
 
 uninstall-logwatch:
-       -rm $(DESTDIR)$(scriptdir_logwatch)/$(program_logwatch) $(DESTDIR)$(confdir_logwatch)/$(program_logwatch).conf
+       rm -f $(DESTDIR)$(scriptdir_logwatch)/$(program_logwatch) \
+              $(DESTDIR)$(confdir_logwatch)/$(program_logwatch).conf
+       rm -rf $(DESTDIR)$(scriptdir_logwatch) \
+               $(DESTDIR)$(confdir_logwatch)
 
 uninstall-standalone:
-       -rm $(DESTDIR)$(scriptdir_standalone)/$(program) $(DESTDIR)$(confdir_standalone)/$(program).conf \
-            $(DESTDIR)$(mandir_standalone)/$(program).1
+       rm -f $(DESTDIR)$(scriptdir_standalone)/$(program) \
+              $(DESTDIR)$(confdir_standalone)/$(program).conf \
+              $(DESTDIR)$(mandir_standalone)/$(program).1
+       rm -rf $(DESTDIR)$(scriptdir_standalone) \
+               $(DESTDIR)$(confdir_standalone) \
+               $(DESTDIR)$(mandir_standalone)
 
 uninstall-all: uninstall-logwatch uninstall-standalone
 
-PKGDIR = /tmp/$(program)-package
-
-release: program htmlpage
+.PHONY: release
+release:
        vers=`egrep 'Version[ ]*=' $(program) | sed "s/.*'\(.*\)';/\1/"` ; \
        echo Preparing version $$vers; \
        rel=$(program)-$$vers ; \
-       tar -czvf $${rel}.tgz --group=0 --owner=0 --mode=644 --transform=s",^,$${rel}/," $(src) ; \
-       md5sum $${rel}.tgz  > $${rel}.tgz.md5 ; \
-       chmod 644 $${rel}.tgz  $${rel}.tgz.md5 
-
-program:
-       $(toolsdir)/build_from_modules $(program) >| $(program);
+       tar -cJf $${rel}.tar.xz --transform=s",^,$${rel}/," $(src);
 
-htmlpage:
-       groff -m mandoc -T ascii $(program).1 | $(toolsdir)/man2html -t 'Man page: $(program)(1)' >| $(program).1.html;
+$(program).1.html: $(program).1
+       man2html $< > $@;