]> git.sur5r.net Git - bacula/bacula/commitdiff
Alter the manpages install target to handle optional compression
authorBen Walton <bwalton@artsci.utoronto.ca>
Sat, 4 Jun 2011 15:37:31 +0000 (11:37 -0400)
committerKern Sibbald <kern@sibbald.com>
Sat, 20 Apr 2013 12:49:02 +0000 (14:49 +0200)
Break the install target for the manpages up such that it depends on a
separate target named install-manpages to copy the files into place.
The install target will then perform compression based on the autoconf
COMPRESS_MANPAGES substitution.

Signed-off-by: Ben Walton <bwalton@artsci.utoronto.ca>
bacula/manpages/Makefile.in

index 9a99d49d666b21dcdf898f580d5d268e700769d0..b3e4d3e2feb65ad8b51f2a8d174551531ea9e35b 100644 (file)
@@ -18,20 +18,24 @@ nothing:
 
 depend:
 
-install:
-       $(MKDIR) $(DESTDIR)/$(mandir)/man8
-       for I in ${MAN8}; \
-         do ($(RMF) $$I.gz; gzip -c $$I >$$I.gz; \
-            $(INSTALL_DATA) $$I.gz $(DESTDIR)$(mandir)/man8/$$I.gz; \
-            rm -f $$I.gz); \
+compress-manpages: install-manpages
+
+install-manpages:
+       $(MKDIR) $(DESTDIR)/$(mandir)/man8 $(DESTDIR)/$(mandir)/man1
+       for I in ${MAN8}; do \
+            $(INSTALL_DATA) $$I $(DESTDIR)$(mandir)/man8/$$I; \
        done
-       $(MKDIR) $(DESTDIR)/$(mandir)/man1
-       for I in ${MAN1}; \
-         do ($(RMF) $$I.gz; gzip -c $$I >$$I.gz; \
-            $(INSTALL_DATA) $$I.gz $(DESTDIR)$(mandir)/man1/$$I.gz; \
-            rm -f $$I.gz); \
+       for I in ${MAN1}; do \
+            $(INSTALL_DATA) $$I $(DESTDIR)$(mandir)/man1/$$I; \
        done
 
+install: install-manpages
+       if [ x@COMPRESS_MANPAGES@ = "xyes" ]; then \
+        for I in $(DESTDIR)/$(mandir)/man8/* $(DESTDIR)/$(mandir)/man1/*; do \
+         gzip $$I; \
+        done; \
+       fi
+
 uninstall:
        for I in ${MAN8}; \
          do (rm -f $(DESTDIR)$(mandir)/man8/$$I.gz); \