Manually remove $(BUILT_SOURCES) since no-dist-built-sources doesnt work
diff --git a/lib/js/Makefile.am b/lib/js/Makefile.am
index 4906d7d..9b7dfb6 100644
--- a/lib/js/Makefile.am
+++ b/lib/js/Makefile.am
@@ -52,6 +52,9 @@
$(RM) -r $(distdir)/test/build/
$(RM) -r $(distdir)/test/gen-*/
+distdir:
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
EXTRA_DIST = \
coding_standards.md \
Gruntfile.js \
diff --git a/lib/js/test/Makefile.am b/lib/js/test/Makefile.am
index 14927c4..8a817b3 100644
--- a/lib/js/test/Makefile.am
+++ b/lib/js/test/Makefile.am
@@ -24,6 +24,9 @@
ANT=$(ANT) ; if test -z "$$ANT" ; then ANT=: ; fi ; \
$$ANT $(ANT_FLAGS) clean
+distdir:
+ $(MAKE) $(AM_MAKEFLAGS) distdir-am
+
check-local: all
$(ANT) $(ANT_FLAGS) test