Add build checks for portable OpenFlow structure padding and alignment.
[sliver-openvswitch.git] / include / openflow / automake.mk
index d473155..8c48b1c 100644 (file)
@@ -2,3 +2,19 @@ noinst_HEADERS += \
        include/openflow/openflow-mgmt.h \
        include/openflow/nicira-ext.h \
        include/openflow/openflow.h
+
+if HAVE_PYTHON
+all-local: include/openflow/openflow.h.stamp
+include/openflow/openflow.h.stamp: \
+       include/openflow/openflow.h build-aux/check-structs
+       $(PYTHON) $(srcdir)/build-aux/check-structs $(srcdir)/include/openflow/openflow.h
+       touch $@
+
+all-local: include/openflow/nicira-ext.h.stamp
+include/openflow/nicira-ext.h.stamp: include/openflow/openflow.h include/openflow/nicira-ext.h build-aux/check-structs
+       $(PYTHON) $(srcdir)/build-aux/check-structs $(srcdir)/include/openflow/openflow.h $(srcdir)/include/openflow/nicira-ext.h
+       touch $@
+endif
+
+EXTRA_DIST += build-aux/check-structs
+DISTCLEANFILES += include/openflow/openflow.h.stamp