Add build checks for portable OpenFlow structure padding and alignment.
[openvswitch] / include / openflow / automake.mk
index d4731550a3100dc2b58b030bf4e1422f2878327d..8c48b1cb7af31c69a282bf96c659fe11f73e0508 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