--- doc/Makefile.in.orig	2014-04-29 20:26:42.618832001 -0700
+++ doc/Makefile.in	2014-04-29 20:29:26.379384101 -0700
@@ -31,7 +31,10 @@
 	$(MAKEINFO) --no-split $(srcdir)/screen.texinfo -o screen.info
 
 install: installdirs
+ifeq (${WITH_MAN},1)
 	$(INSTALL_DATA) $(srcdir)/screen.1 $(DESTDIR)$(mandir)/man1/screen.1
+endif
+ifeq (${WITH_INFO},1)
 	-$(MAKE) screen.info
 	-if test -f screen.info; then d=.; else d=$(srcdir); fi; \
 	if test -f $$d/screen.info; then \
@@ -40,13 +43,19 @@
 	  install-info --info-dir=$(DESTDIR)$(infodir) $(DESTDIR)$(infodir)/screen.info; \
 	else true; fi; \
 	fi
+endif
 
 uninstall:
 	rm -f $(DESTDIR)$(mandir)/man1/screen.1
 	rm -f $(DESTDIR)$(infodir)/screen.info*
 
 installdirs:
-	$(srcdir)/../etc/mkinstalldirs $(DESTDIR)$(mandir)/man1 $(DESTDIR)$(infodir)
+ifeq (${WITH_MAN},1)
+	$(srcdir)/../etc/mkinstalldirs $(DESTDIR)$(mandir)/man1
+endif
+ifeq (${WITH_INFO},1)
+	$(srcdir)/../etc/mkinstalldirs $(DESTDIR)$(infodir)
+endif
 
 mostlyclean:
 	-rm -f *.cp *.cps *.fn *.fns *.ky *.kys *.pg *.tp *.vr
