# included from Top Level Makefile.am
# All paths should be given relative to the root
-if HAVE_RECENT_SPHINX
-if IS_VCS_CHECKOUT
-
-dist-hook: man
+RST_FILES= $(shell find $(top_builddir)/docs/source -type f -name '*.rst')
# Build rule for documentation
-$(dist_man_MANS): man
-
-BUILT_SOURCES+= $(dist_man_MANS)
-
-endif
-endif
+$(dist_man_MANS): $(RST_FILES)
+ @cp docs/build/$@ $@
-if HAVE_RECENT_SPHINX
dist_man_MANS+= man/memaslap.1
dist_man_MANS+= man/memcapable.1
dist_man_MANS+= man/memcat.1
dist_man_MANS+= man/memcached_touch_by_key.3
dist_man_MANS+= man/memcached_verbosity.3
dist_man_MANS+= man/memcached_version.3
-endif