~james-page/ubuntu/saucy/openvswitch/1.12-snapshot

« back to all changes in this revision

Viewing changes to Makefile.am

  • Committer: James Page
  • Date: 2013-08-21 10:16:57 UTC
  • mfrom: (1.1.20)
  • Revision ID: james.page@canonical.com-20130821101657-3o0z0qeiv5zkwlzi
New upstream snapshot

Show diffs side-by-side

added added

removed removed

Lines of Context:
1
 
# Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012 Nicira, Inc.
 
1
# Copyright (C) 2007, 2008, 2009, 2010, 2011, 2012, 2013 Nicira, Inc.
2
2
#
3
3
# Copying and distribution of this file, with or without modification,
4
4
# are permitted in any medium without royalty provided the copyright
55
55
        NOTICE \
56
56
        OPENFLOW-1.1+ \
57
57
        PORTING \
 
58
        README-OFTest \
58
59
        README-gcov \
 
60
        README-lisp \
59
61
        REPORTING-BUGS \
60
62
        SubmittingPatches \
61
63
        WHY-OVS \
183
185
        fi
184
186
.PHONY: config-h-check
185
187
 
186
 
# Check that "struct vlog_ratelimit" is always declared "static".
187
 
ALL_LOCAL += rate-limit-check
188
 
rate-limit-check:
 
188
# Check that certain data structures are always declared "static".
 
189
ALL_LOCAL += static-check
 
190
static-check:
189
191
        @if test -e $(srcdir)/.git && (git --version) >/dev/null 2>&1 && \
190
 
            git --no-pager grep -n -E '^[       ]+struct vlog_rate_limit.*=' $(srcdir); \
 
192
            git --no-pager grep -n -E '^[       ]+(struct vlog_rate_limit|pthread_once_t|struct ovsthread_once).*=' $(srcdir); \
191
193
         then \
192
194
            echo "See above for list of violations of the rule that "; \
193
 
            echo "'struct vlog_rate_limit' must always be 'static'"; \
 
195
            echo "certain data structures must always be 'static'"; \
194
196
            exit 1; \
195
197
         fi
196
 
.PHONY: rate-limit-check
 
198
.PHONY: static-check
197
199
 
198
200
# Check that assert.h is not used outside a whitelist of files.
199
201
ALL_LOCAL += check-assert-h-usage
200
202
check-assert-h-usage:
201
203
        @if test -e $(srcdir)/.git && (git --version) >/dev/null 2>&1 && \
202
204
            (cd $(srcdir) && git --no-pager grep -l -E '[<]assert.h[>]') | \
203
 
            $(EGREP) -v '^lib/(sflow_receiver|vlog|worker).c$$|^tests/'; \
 
205
            $(EGREP) -v '^lib/(sflow_receiver|vlog).c$$|^tests/'; \
204
206
         then \
205
207
            echo "Files listed above unexpectedly #include <""assert.h"">."; \
206
208
            echo "Please use ovs_assert (from util.h) instead of assert."; \
208
210
         fi
209
211
.PHONY: check-assert-h-usage
210
212
 
 
213
ALL_LOCAL += thread-safety-check
 
214
thread-safety-check:
 
215
        @if test -e '$(srcdir)'/.git && (git --version) >/dev/null 2>&1 && \
 
216
           grep -n -f '$(srcdir)'/build-aux/thread-safety-blacklist \
 
217
               `git ls-files '$(srcdir)' | grep '\.[ch]$$' \
 
218
                | $(EGREP) -v '^datapath|^lib/sflow|^third-party'` \
 
219
               | $(EGREP) -v ':[        ]*/?\*'; \
 
220
        then \
 
221
            echo "See above for list of calls to functions that are"; \
 
222
            echo "blacklisted due to thread safety issues"; \
 
223
            exit 1; \
 
224
        fi
 
225
EXTRA_DIST += build-aux/thread-safety-blacklist
 
226
 
211
227
if HAVE_GROFF
212
228
ALL_LOCAL += manpage-check
213
229
manpage-check: $(man_MANS) $(dist_man_MANS) $(noinst_man_MANS)
257
273
include xenserver/automake.mk
258
274
include python/automake.mk
259
275
include python/compat/automake.mk
 
276
include tutorial/automake.mk