diff --git a/docs/reference/gdk-pixbuf/Makefile.am b/docs/reference/gdk-pixbuf/Makefile.am
index 3bf686d..f1949ce 100644
--- a/docs/reference/gdk-pixbuf/Makefile.am
+++ b/docs/reference/gdk-pixbuf/Makefile.am
@@ -79,14 +79,13 @@ EXTRA_DIST += version.xml.in \
 
 ########################################################################
 
-man_MANS = gdk-pixbuf-csource.1 gdk-pixbuf-query-loaders.1 
-
 if ENABLE_MAN
 
+man_MANS = gdk-pixbuf-csource.1 gdk-pixbuf-query-loaders.1 
+
 %.1 : %.xml 
 	@XSLTPROC@ -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
 
-endif
 
 BUILT_EXTRA_DIST = $(man_MANS)
 
@@ -95,3 +94,5 @@ dist-hook-local: $(BUILT_EXTRA_DIST)
 	for f in $$files; do					\
 	  if test -f $$f; then d=.; else d=$(srcdir); fi;	\
 	  cp $$d/$$f $(distdir) || exit 1; done
+
+endif
diff --git a/docs/reference/gtk/Makefile.am b/docs/reference/gtk/Makefile.am
index 2e2b9f8..350d324 100644
--- a/docs/reference/gtk/Makefile.am
+++ b/docs/reference/gtk/Makefile.am
@@ -361,19 +361,19 @@ EXTRA_DIST += version.xml.in
 
 ########################################################################
 
-man_MANS = gtk-query-immodules-2.0.1 gtk-update-icon-cache.1 gtk-builder-convert.1
-
 if ENABLE_MAN
 
+man_MANS = gtk-query-immodules-2.0.1 gtk-update-icon-cache.1 gtk-builder-convert.1
+
 %.1 : %.xml 
 	@XSLTPROC@ -nonet http://docbook.sourceforge.net/release/xsl/current/manpages/docbook.xsl $<
 
 endif
 
-BUILT_EXTRA_DIST = $(man_MANS)
-
 dist-hook-local: $(BUILT_EXTRA_DIST)
 	files='$(BUILT_EXTRA_DIST)';				\
 	for f in $$files; do					\
 	  if test -f $$f; then d=.; else d=$(srcdir); fi;	\
 	  cp $$d/$$f $(distdir) || exit 1; done
+
+BUILT_EXTRA_DIST = $(man_MANS)
