THRIFT-4717: fix up make clean with autoconf
diff --git a/tutorial/d/Makefile.am b/tutorial/d/Makefile.am
index d8c8b29..358294c 100644
--- a/tutorial/d/Makefile.am
+++ b/tutorial/d/Makefile.am
@@ -44,3 +44,10 @@
 
 clean:
 	$(RM) -f $(PROGS)
+	$(RM) -r gen-d/
+	find . -type f -name '*.o' | xargs rm -f
+
+dist-hook:
+	$(RM) -f $(distdir)/$(PROGS)
+	$(RM) -r $(distdir)/gen-d/
+	find $(destdir) -type f -name '*.o' | xargs rm -f