Automatically extract error types and codes for formatting.
[openvswitch] / lib / automake.mk
index f5d23a23b116d8328b9cded62c028557eb93b39d..269ab897f817f3d8016ee09fff0076be8c5f5033 100644 (file)
@@ -81,6 +81,8 @@ lib_libopenvswitch_a_SOURCES = \
        lib/nx-match.h \
        lib/odp-util.c \
        lib/odp-util.h \
+       lib/ofp-errors.c \
+       lib/ofp-errors.h \
        lib/ofp-parse.c \
        lib/ofp-parse.h \
        lib/ofp-print.c \
@@ -245,6 +247,14 @@ lib/dirs.c: lib/dirs.c.in Makefile
             > lib/dirs.c.tmp
        mv lib/dirs.c.tmp lib/dirs.c
 
+$(srcdir)/lib/ofp-errors.c: \
+       include/openflow/openflow.h include/openflow/nicira-ext.h \
+       build-aux/extract-ofp-errors
+       cd $(srcdir)/include && \
+       $(PYTHON) ../build-aux/extract-ofp-errors \
+               openflow/openflow.h openflow/nicira-ext.h > ../lib/ofp-errors.c
+EXTRA_DIST += build-aux/extract-ofp-errors
+
 install-data-local: lib-install-data-local
 lib-install-data-local:
        $(MKDIR_P) $(DESTDIR)$(RUNDIR)