# included from Top Level Makefile.am
# All paths should be given relative to the root
+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)
+$(dist_man_MANS): $(RST_FILES)
+ @cp docs/build/$@ $@
dist_man_MANS+= man/memaslap.1
dist_man_MANS+= man/memcapable.1