Index: doc/Makefile.am
--- doc/Makefile.am.orig	2015-02-14 08:36:46.000000000 +0100
+++ doc/Makefile.am	2015-10-14 18:21:10.666387768 +0200
@@ -55,6 +55,7 @@
 
 MANPAGES_DST = $(MANPAGES_SRC:${SPHINX_DIR}/%.rst=%.3)
 
+if HAVE_SPHINX_BUILD
 MANPAGES = $(MANPAGES_WITH_SRC) \
 	man/wslay_event_context_client_init.3 \
 	man/wslay_event_context_free.3
@@ -63,7 +64,6 @@
 
 EXTRA_DIST = $(MANPAGES) $(SPHINX_FILES)
 
-if HAVE_SPHINX_BUILD
 $(MANPAGES_WITH_SRC): $(SPHINX_MANPAGES_SRC)
 	echo $(MANPAGES_DST)
 	@SPHINX_BUILD@ -b man $(SPHINX_DIR) man
