$OpenBSD$

Index: doc/Makefile.local
--- doc/Makefile.local.orig
+++ doc/Makefile.local
@@ -22,7 +22,7 @@ MAN5_ROFF := $(patsubst $(srcdir)/doc/%,$(DOCBUILDDIR)
 MAN7_ROFF := $(patsubst $(srcdir)/doc/%,$(DOCBUILDDIR)/man/%,$(MAN7_RST:.rst=.7))
 MAN_ROFF_FILES := $(MAN1_ROFF) $(MAN5_ROFF) $(MAN7_ROFF)
 
-MAN_GZIP_FILES := $(addsuffix .gz,${MAN_ROFF_FILES})
+MAN_FILES := ${MAN_ROFF_FILES}
 
 MAN1_TEXI := $(patsubst $(srcdir)/doc/man1/%.rst,$(DOCBUILDDIR)/texinfo/%.texi,$(MAN1_RST))
 MAN5_TEXI := $(patsubst $(srcdir)/doc/man5/%.rst,$(DOCBUILDDIR)/texinfo/%.texi,$(MAN5_RST))
@@ -34,9 +34,6 @@ INFO_INFO_FILES := $(INFO_TEXI_FILES:.texi=.info)
 
 .PHONY: install-man build-man apidocs install-apidocs
 
-%.gz: %
-	rm -f $@ && gzip --stdout $^ > $@
-
 # Sequentialize the calls to sphinx-build to avoid races with
 # reading/writing cached state. This uses GNU make specific
 # "order-only" prerequisites.
@@ -52,7 +49,7 @@ sphinx-texinfo:
 	$(SPHINXBUILD) -b texinfo $(ALLSPHINXOPTS) $(DOCBUILDDIR)/texinfo
 
 sphinx-info: sphinx-texinfo
-	make -C $(DOCBUILDDIR)/texinfo info
+	gmake -C $(DOCBUILDDIR)/texinfo info
 
 # Use the man page converter that is available. We should never depend
 # on MAN_ROFF_FILES if a converter is not available.
@@ -78,11 +75,11 @@ endif
 install-man: install-apidocs
 
 ifeq ($(HAVE_DOXYGEN),1)
-MAN_GZIP_FILES += ${APIMAN}.gz
+MAN_FILES += ${APIMAN}
 apidocs: $(APIMAN)
-install-apidocs: ${APIMAN}.gz
+install-apidocs: ${APIMAN}
 	mkdir -p "$(DESTDIR)$(mandir)/man3"
-	install -m0644 $(filter %.3.gz,$(MAN_GZIP_FILES)) $(DESTDIR)/$(mandir)/man3
+	install -m0644 $(MAN_FILES) $(DESTDIR)/$(mandir)/man3
 
 $(APIMAN): $(dir)/config.dox $(srcdir)/$(dir)/doxygen.cfg $(srcdir)/lib/notmuch.h
 	mkdir -p $(DOCBUILDDIR)/man/man3
@@ -101,15 +98,15 @@ build-man:
 install-man:
 	@echo "No sphinx, will not install man pages."
 else
-build-man: ${MAN_GZIP_FILES}
-install-man: ${MAN_GZIP_FILES}
+build-man: ${MAN_FILES}
+install-man: ${MAN_FILES}
 	mkdir -m0755 -p "$(DESTDIR)$(mandir)/man1"
 	mkdir -m0755 -p "$(DESTDIR)$(mandir)/man5"
 	mkdir -m0755 -p "$(DESTDIR)$(mandir)/man7"
-	install -m0644 $(filter %.1.gz,$(MAN_GZIP_FILES)) $(DESTDIR)/$(mandir)/man1
-	install -m0644 $(filter %.5.gz,$(MAN_GZIP_FILES)) $(DESTDIR)/$(mandir)/man5
-	install -m0644 $(filter %.7.gz,$(MAN_GZIP_FILES)) $(DESTDIR)/$(mandir)/man7
-	cd $(DESTDIR)/$(mandir)/man1 && ln -sf notmuch.1.gz notmuch-setup.1.gz
+	install -m0644 $(MAN_FILES) $(DESTDIR)/$(mandir)/man1
+	install -m0644 $(MAN_FILES) $(DESTDIR)/$(mandir)/man5
+	install -m0644 $(MAN_FILES) $(DESTDIR)/$(mandir)/man7
+	cd $(DESTDIR)/$(mandir)/man1 && ln -sf notmuch.1 notmuch-setup.1
 endif
 
 ifneq ($(HAVE_SPHINX)$(HAVE_MAKEINFO),11)
@@ -134,4 +131,4 @@ $(dir)/config.dox: version.stamp
 	echo "INPUT=${srcdir}/lib/notmuch.h" >> $@
 
 CLEAN := $(CLEAN) $(DOCBUILDDIR) $(DOCBUILDDIR)/.roff.stamp
-CLEAN := $(CLEAN) $(MAN_GZIP_FILES) $(MAN_ROFF_FILES) $(dir)/conf.pyc $(dir)/config.dox
+CLEAN := $(CLEAN) $(MAN_FILES) $(MAN_ROFF_FILES) $(dir)/conf.pyc $(dir)/config.dox
