diff options
author | Ben Pfaff <blp@nicira.com> | 2011-01-12 09:22:12 -0800 |
---|---|---|
committer | Ben Pfaff <blp@nicira.com> | 2011-01-12 09:22:12 -0800 |
commit | db5ce51427906ed54aa3e8e1dffc0ba6d908aa8c (patch) | |
tree | fad0db2d2eb4632a1a3a1abf13c195c910c85244 /Makefile.am | |
parent | 815bba308c075c0caa23972f4f50baea334e0199 (diff) |
Fix non-static instances of "struct vlog_rate_limit" and add check.
A non-static vlog_rate_limit is not actually going to rate-limit anything.
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Makefile.am b/Makefile.am index 689fd6cc..deae5127 100644 --- a/Makefile.am +++ b/Makefile.am @@ -124,6 +124,17 @@ distfiles: Makefile -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t" | sort -u > $@ CLEANFILES += distfiles +# Check that "struct vlog_ratelimit" is always declared "static". +ALL_LOCAL += rate-limit-check +rate-limit-check: + @if test -e $(srcdir)/.git && (git --version) >/dev/null 2>&1 && \ + git --no-pager grep -n -E '^[ ]+struct vlog_rate_limit.*=' $(srcdir); \ + then \ + echo "See above for list of violations of the rule that "; \ + echo "'struct vlog_rate_limit' must always be 'static'"; \ + exit 1; \ + fi + dist-hook: $(DIST_HOOKS) all-local: $(ALL_LOCAL) clean-local: $(CLEAN_LOCAL) |