]> gitweb.michael.orlitzky.com - amavis-logwatch.git/commitdiff
Makefile: whitespace cleanup and minor quality-of-life improvements.
authorMichael Orlitzky <michael@orlitzky.com>
Thu, 5 Aug 2021 22:31:06 +0000 (18:31 -0400)
committerMichael Orlitzky <michael@orlitzky.com>
Thu, 5 Aug 2021 22:35:31 +0000 (18:35 -0400)
Makefile

index 2e09bf6f962d77459bb4a412dbc10298f06aeed1..b800ee50db32f0f13dabaec10af74b7e8b29dae7 100644 (file)
--- a/Makefile
+++ b/Makefile
@@ -24,26 +24,49 @@ 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