THRIFT-4717: fix up make clean with autoconf
diff --git a/test/lua/Makefile.am b/test/lua/Makefile.am
index ed8c5ae..b2683e1 100644
--- a/test/lua/Makefile.am
+++ b/test/lua/Makefile.am
@@ -28,4 +28,7 @@
 precross: stubs
 
 clean-local:
-	$(RM) -r gen-lua
+	$(RM) -r gen-lua/
+
+dist-hook:
+	$(RM) -r $(distdir)/gen-lua/