Implement QoS framework.
[sliver-openvswitch.git] / lib / automake.mk
index 53a9006..71e4d61 100644 (file)
@@ -34,7 +34,6 @@ lib_libopenvswitch_a_SOURCES = \
        lib/dhcp.h \
        lib/dhparams.h \
        lib/dirs.h \
-       lib/dpif-linux.c \
        lib/dpif-netdev.c \
        lib/dpif-provider.h \
        lib/dpif.c \
@@ -63,18 +62,15 @@ lib_libopenvswitch_a_SOURCES = \
        lib/lockfile.h \
        lib/mac-learning.c \
        lib/mac-learning.h \
-       lib/netdev-gre.c \
-       lib/netdev-linux.c \
-       lib/netdev-patch.c \
        lib/netdev-provider.h \
-       lib/netdev-vport.c \
-       lib/netdev-vport.h \
        lib/netdev.c \
        lib/netdev.h \
        lib/odp-util.c \
        lib/odp-util.h \
        lib/ofp-print.c \
        lib/ofp-print.h \
+       lib/ofp-util.c \
+       lib/ofp-util.h \
        lib/ofpbuf.c \
        lib/ofpbuf.h \
        lib/ovsdb-data.c \
@@ -106,8 +102,6 @@ lib_libopenvswitch_a_SOURCES = \
        lib/rconn.h \
        lib/reconnect.c \
        lib/reconnect.h \
-       lib/rtnetlink.c \
-       lib/rtnetlink.h \
        lib/sat-math.h \
        lib/sha1.c \
        lib/sha1.h \
@@ -175,9 +169,17 @@ endif
 
 if HAVE_NETLINK
 lib_libopenvswitch_a_SOURCES += \
+       lib/dpif-linux.c \
+       lib/netdev-gre.c \
+       lib/netdev-linux.c \
+       lib/netdev-patch.c \
+       lib/netdev-vport.c \
+       lib/netdev-vport.h \
        lib/netlink-protocol.h \
        lib/netlink.c \
-       lib/netlink.h
+       lib/netlink.h \
+       lib/rtnetlink.c \
+       lib/rtnetlink.h
 endif
 
 if HAVE_OPENSSL
@@ -260,3 +262,31 @@ lib/coverage-counters.c: $(COVERAGE_FILES) lib/coverage-scan.pl
        (cd $(srcdir) && $(PERL) lib/coverage-scan.pl $(COVERAGE_FILES)) > $@.tmp
        mv $@.tmp $@
 EXTRA_DIST += lib/coverage-scan.pl
+
+
+# Make sure that every vlog module listed in vlog-modules.def is
+# actually used somewhere.
+ALL_LOCAL += check-for-unused-vlog-modules
+check-for-unused-vlog-modules:
+       if test -e $(srcdir)/.git && (git --version) >/dev/null 2>&1; then    \
+         cd $(srcdir);                                                       \
+         decl_vlog=`sed -n 's/^VLOG_MODULE(\([_a-z0-9]\{1,\}\)).*$$/\1/p'    \
+                    lib/vlog-modules.def |                                   \
+                     LC_ALL=C sort -u |                                              \
+                     xargs echo`;                                            \
+         used_vlog=`git grep VLM_ |                                          \
+                    sed -n 's/.*VLM_\([a-z_0-9]\{1,\}\).*/\1/p' |            \
+                    LC_ALL=C sort -u |                                       \
+                     xargs echo`;                                            \
+         rc=0;                                                               \
+         for decl in $$decl_vlog; do                                         \
+            case " $$used_vlog " in                                          \
+             *" $$decl "*) ;;                                                \
+             *) echo "vlog module $$decl is declared in lib/vlog-modules.def \
+but not used by any source file";                                            \
+                 rc=1 ;;                                                     \
+            esac                                                             \
+          done;                                                                      \
+         exit $$rc;                                                          \
+       fi
+.PHONY: check-for-unused-vlog-modules