+man: $(srcdir)/rsync.1 $(srcdir)/rsyncd.conf.5
+
+$(srcdir)/configure: $(srcdir)/configure.in $(srcdir)/aclocal.m4
+ cd $(srcdir); autoconf
+
+$(srcdir)/config.h.in: $(srcdir)/configure.in $(srcdir)/aclocal.m4
+ cd $(srcdir); autoheader
+
+$(srcdir)/rsync.1: $(srcdir)/rsync.yo
+ yodl2man -o $(srcdir)/rsync.1 $(srcdir)/rsync.yo
+
+$(srcdir)/rsyncd.conf.5: $(srcdir)/rsyncd.conf.yo
+ yodl2man -o $(srcdir)/rsyncd.conf.5 $(srcdir)/rsyncd.conf.yo
+
+proto:
+ cat $(srcdir)/*.c $(srcdir)/lib/compat.c | awk -f $(srcdir)/mkproto.awk >$(srcdir)/proto.h.new
+ if diff $(srcdir)/proto.h $(srcdir)/proto.h.new >/dev/null; then \
+ rm $(srcdir)/proto.h.new; \
+ else \
+ mv $(srcdir)/proto.h.new $(srcdir)/proto.h; \
+ fi
+
+clean: cleantests
+ rm -f *~ $(OBJS) $(TLS_OBJ) $(CHECK_PROGS) $(CHECK_OBJS)
+
+cleantests:
+ rm -rf ./testtmp*
+
+# We try to delete built files from both the source and build
+# directories, just in case somebody previously configured things in
+# the source directory.