debian: Check for accurate Debian changelog version at build time too.
[sliver-openvswitch.git] / debian / automake.mk
index 80b66cc..7c656c8 100644 (file)
@@ -1,7 +1,5 @@
 EXTRA_DIST += \
        debian/changelog \
-       debian/commands/reconfigure \
-       debian/commands/update \
        debian/compat \
        debian/control \
        debian/control.modules.in \
@@ -60,5 +58,17 @@ EXTRA_DIST += \
        debian/ovs-switch-setup.8 \
        debian/po/POTFILES.in \
        debian/po/templates.pot \
+       debian/reconfigure \
        debian/rules \
        debian/rules.modules
+
+check-debian-changelog-version:
+       @if $(FGREP) '($(VERSION))' $(srcdir)/debian/changelog >/dev/null; \
+       then                                                               \
+         :;                                                               \
+       else                                                               \
+         echo "Update debian/changelog to mention version $(VERSION)";    \
+         exit 1;                                                          \
+       fi
+ALL_LOCAL += check-debian-changelog-version
+DIST_HOOKS += check-debian-changelog-version