lib/dhcp.h \
lib/dhparams.h \
lib/dirs.h \
- lib/dpif-linux.c \
lib/dpif-netdev.c \
lib/dpif-provider.h \
lib/dpif.c \
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 \
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 \
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
(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