Makefile: Stricter checks for release distchecks
authorMichael Hanselmann <hansmi@google.com>
Wed, 27 Oct 2010 15:20:20 +0000 (17:20 +0200)
committerMichael Hanselmann <hansmi@google.com>
Wed, 27 Oct 2010 16:57:33 +0000 (18:57 +0200)
This should avoid cases like commit f64de30f where the release
date was forgotten from NEWS.

Signed-off-by: Michael Hanselmann <hansmi@google.com>
Reviewed-by: Iustin Pop <iustin@google.com>

Makefile.am

index 7384d3d..51f23c3 100644 (file)
@@ -662,6 +662,15 @@ distcheck-hook:
                echo "Found backup files in final archive." 1>&2; \
                exit 1; \
        fi
+       if test -n "$(BUILD_RELEASE)" && \
+          grep -n -H -E '^\*.*unreleased' $(top_distdir)/NEWS; then \
+               echo "Found unreleased version in NEWS." >&2; \
+               exit 1; \
+       fi
+
+# When building a release, stricter checks should be used
+distcheck-release: export BUILD_RELEASE = 1
+distcheck-release: distcheck
 
 install-exec-local:
        @mkdir_p@ "$(DESTDIR)${localstatedir}/lib/ganeti" \