automake: Prevent `dist` or `distcheck` when uncommitted changes are present
diff --git a/Makefile.am b/Makefile.am
index 5ca15d0..559d84c 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -7,4 +7,5 @@
 	git-version-gen
 
 dist-hook:
+	@if ! git diff --quiet; then echo "Uncommitted changes present; not releasing"; exit 1; fi
 	echo $(VERSION) > $(distdir)/.tarball-version