X-Git-Url: https://pintos-os.org/cgi-bin/gitweb.cgi?a=blobdiff_plain;f=lib%2Fautomake.mk;h=71e4d61fb25d3aea514e5f1c294a15c4775f1b25;hb=f51c1d9890c84c00950dbe5d174ef2682686bcb3;hp=51d3c11bff8b7576c372fa165d63f35dc4ee68c7;hpb=bfe8e67ad595348f228938663956c3b8325997c5;p=openvswitch diff --git a/lib/automake.mk b/lib/automake.mk index 51d3c11b..71e4d61f 100644 --- a/lib/automake.mk +++ b/lib/automake.mk @@ -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,7 +62,6 @@ lib_libopenvswitch_a_SOURCES = \ lib/lockfile.h \ lib/mac-learning.c \ lib/mac-learning.h \ - lib/netdev-linux.c \ lib/netdev-provider.h \ lib/netdev.c \ lib/netdev.h \ @@ -71,6 +69,8 @@ lib_libopenvswitch_a_SOURCES = \ 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 \ @@ -102,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 \ @@ -133,6 +131,7 @@ lib_libopenvswitch_a_SOURCES = \ lib/timeval.c \ lib/timeval.h \ lib/type-props.h \ + lib/unaligned.h \ lib/unicode.c \ lib/unicode.h \ lib/unixctl.c \ @@ -170,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 @@ -205,6 +212,8 @@ EXTRA_DIST += \ lib/ssl-peer-ca-cert.man \ lib/ssl.man \ lib/ssl-syn.man \ + lib/unixctl.man \ + lib/unixctl-syn.man \ lib/vconn-active.man \ lib/vconn-passive.man \ lib/vlog-unixctl.man \ @@ -253,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