summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorfergus.henderson <fergus.henderson@01de4be4-8c4a-0410-9132-4925637da917>2011-10-25 01:49:56 +0000
committerfergus.henderson <fergus.henderson@01de4be4-8c4a-0410-9132-4925637da917>2011-10-25 01:49:56 +0000
commit66bff9d28f621d15b7c132913005f08b197fc154 (patch)
tree66dc054a8a4a97c8cc2b378993f156bb94afdae4
parentca9d7ca1406d5a7279532b5319ab973a4a07ffd3 (diff)
downloaddistcc-66bff9d28f621d15b7c132913005f08b197fc154.tar.gz
Gzip the man pages before installing them.
This is required by the Debian policy manual <http://www.debian.org/doc/debian-policy/ch-docs.html> and is also assumed by our packaging/RedHat/rpm.spec file which we use for building both RPM and Debian packages. Also some whitespaces changes; only the first of the four segments in this patch has non-whitespace changes. git-svn-id: http://distcc.googlecode.com/svn/trunk@747 01de4be4-8c4a-0410-9132-4925637da917
-rw-r--r--Makefile.in25
1 files changed, 17 insertions, 8 deletions
diff --git a/Makefile.in b/Makefile.in
index cc4bd9b..c626a70 100644
--- a/Makefile.in
+++ b/Makefile.in
@@ -1081,26 +1081,34 @@ install-include-server: include-server pump
install-man: $(man1_MEN)
$(mkinstalldirs) "$(DESTDIR)$(man1dir)"
- for p in $(man1_MEN); do \
- $(INSTALL_DATA) "$(srcdir)/$$p" "$(DESTDIR)$(man1dir)" || exit 1; \
+ for p in $(man1_MEN); do \
+ if $(GZIP_BIN) --help >/dev/null; then \
+ if [ -e "$(DESTDIR)$(man1dir)$$p" ]; then rm -fv "$(DESTDIR)$(man1dir)$$p"; fi; \
+ $(GZIP_BIN) < "$(srcdir)/$$p" > "$$p.gz"; \
+ $(INSTALL_DATA) "$$p.gz" "$(DESTDIR)$(man1dir)" || exit 1; \
+ else \
+ echo "Warning: no working gzip, installing man pages uncompressed" 1>&2; \
+ if [ -e "$(DESTDIR)$(man1dir)$$p.gz" ]; then rm -fv "$(DESTDIR)$(man1dir)$$p.gz"; fi; \
+ $(INSTALL_DATA) "$(srcdir)/$$p" "$(DESTDIR)$(man1dir)" || exit 1; \
+ fi; \
done
install-doc: $(pkgdoc_DOCS)
$(mkinstalldirs) "$(DESTDIR)$(docdir)"
- for p in $(pkgdoc_DOCS); do \
- $(INSTALL_DATA) "$(srcdir)/$$p" "$(DESTDIR)$(docdir)" || exit 1; \
+ for p in $(pkgdoc_DOCS); do \
+ $(INSTALL_DATA) "$(srcdir)/$$p" "$(DESTDIR)$(docdir)" || exit 1; \
done
install-example: $(example_DOCS)
$(mkinstalldirs) "$(DESTDIR)$(docdir)/example"
- for p in $(example_DOCS); do \
- $(INSTALL_DATA) "$(srcdir)/$$p" "$(DESTDIR)$(docdir)/example" || exit 1; \
+ for p in $(example_DOCS); do \
+ $(INSTALL_DATA) "$(srcdir)/$$p" "$(DESTDIR)$(docdir)/example" || exit 1; \
done
install-gnome-data: $(gnome_data)
$(mkinstalldirs) "$(DESTDIR)$(pkgdatadir)"
- for p in $(gnome_data); do \
- $(INSTALL_DATA) "$$p" "$(DESTDIR)$(pkgdatadir)" || exit 1; \
+ for p in $(gnome_data); do \
+ $(INSTALL_DATA) "$$p" "$(DESTDIR)$(pkgdatadir)" || exit 1; \
done
install-conf: $(conf_files) $(default_files)
@@ -1162,6 +1170,7 @@ uninstall-man:
for p in $(man1_MEN); do \
file="$(DESTDIR)$(man1dir)/`basename $$p`"; \
if [ -e "$$file" ]; then rm -fv "$$file"; fi \
+ if [ -e "$$file.gz" ]; then rm -fv "$$file.gz"; fi \
done
-[ "`basename $(man1dir)`" = "$(PACKAGE)" ] && rmdir "$(DESTDIR)$(man1dir)"