]>
Commit | Line | Data |
---|---|---|
939f4522 | 1 | # Copyright (C) 2007-2017 Nicira, Inc. |
a14bc59f BP |
2 | # |
3 | # Copying and distribution of this file, with or without modification, | |
4 | # are permitted in any medium without royalty provided the copyright | |
5 | # notice and this notice are preserved. This file is offered as-is, | |
6 | # without warranty of any kind. | |
7 | ||
064af421 BP |
8 | AUTOMAKE_OPTIONS = foreign subdir-objects |
9 | ACLOCAL_AMFLAGS = -I m4 | |
10 | SUBDIRS = datapath | |
11 | ||
064af421 | 12 | AM_CPPFLAGS = $(SSL_CFLAGS) |
cf06c2e9 | 13 | AM_LDFLAGS = $(SSL_LDFLAGS) |
95626395 | 14 | AM_LDFLAGS += $(OVS_LDFLAGS) |
e42dfc72 AS |
15 | |
16 | if WIN32 | |
17 | AM_CPPFLAGS += -I $(top_srcdir)/include/windows | |
c803536e | 18 | AM_CPPFLAGS += -I $(top_srcdir)/datapath-windows/include |
94887cf4 | 19 | AM_CPPFLAGS += $(PTHREAD_INCLUDES) |
b0e1bce5 | 20 | AM_CPPFLAGS += $(MSVC_CFLAGS) |
94887cf4 | 21 | AM_LDFLAGS += $(PTHREAD_LDFLAGS) |
1cb3649c | 22 | AM_LDFLAGS += $(MSVC64_LDFLAGS) |
b0bf5ef2 | 23 | PLATFORM = $(MSVC_PLATFORM) |
e42dfc72 AS |
24 | endif |
25 | ||
064af421 | 26 | AM_CPPFLAGS += -I $(top_srcdir)/include |
837eefc7 | 27 | AM_CPPFLAGS += -I $(top_builddir)/include |
064af421 | 28 | AM_CPPFLAGS += -I $(top_srcdir)/lib |
611d30ce | 29 | AM_CPPFLAGS += -I $(top_builddir)/lib |
064af421 | 30 | |
8605a29b PK |
31 | AM_CPPFLAGS += $(SSL_INCLUDES) |
32 | ||
064af421 | 33 | AM_CFLAGS = -Wstrict-prototypes |
d161c099 | 34 | AM_CFLAGS += $(WARNING_FLAGS) |
95626395 | 35 | AM_CFLAGS += $(OVS_CFLAGS) |
064af421 | 36 | |
58397e6c KT |
37 | if DPDK_NETDEV |
38 | AM_CFLAGS += -D_FILE_OFFSET_BITS=64 | |
8e6681ea AC |
39 | DPDKSTRIP_FLAGS = --dpdk |
40 | else | |
41 | DPDKSTRIP_FLAGS = --nodpdk | |
58397e6c KT |
42 | endif |
43 | ||
064af421 BP |
44 | if NDEBUG |
45 | AM_CPPFLAGS += -DNDEBUG | |
46 | AM_CFLAGS += -fomit-frame-pointer | |
064af421 BP |
47 | endif |
48 | ||
0eaaacac FL |
49 | AM_CTAGSFLAGS = $(OVS_CTAGS_IDENTIFIERS_LIST) |
50 | ||
b02e1154 GS |
51 | if WIN32 |
52 | psep=";" | |
53 | else | |
54 | psep=":" | |
55 | endif | |
853d1083 BP |
56 | # PYTHONDONTWRITEBYTECODE=yes keeps Python from creating .pyc and .pyo |
57 | # files. Creating .py[co] works OK for any given version of Open | |
58 | # vSwitch, but it causes trouble if you switch from a version with | |
59 | # foo/__init__.py into an (older) version with plain foo.py, since | |
60 | # foo/__init__.pyc will cause Python to ignore foo.py. | |
e23812fc BP |
61 | run_python = \ |
62 | PYTHONPATH=$(top_srcdir)/python$(psep)$$PYTHONPATH \ | |
63 | PYTHONDONTWRITEBYTECODE=yes $(PYTHON) | |
853d1083 | 64 | |
22c79496 | 65 | ALL_LOCAL = |
d879a707 | 66 | BUILT_SOURCES = |
064af421 | 67 | CLEANFILES = |
15b619e2 | 68 | CLEAN_LOCAL = |
064af421 | 69 | DISTCLEANFILES = |
79982e90 | 70 | PYCOV_CLEAN_FILES = build-aux/check-structs,cover |
4441a01c | 71 | |
c431227e | 72 | EXTRA_DIST = \ |
8a97dc6e | 73 | AUTHORS.rst \ |
255efa72 | 74 | CONTRIBUTING.rst \ |
888cf44d | 75 | LICENSE \ |
2eb98b60 | 76 | MAINTAINERS.rst \ |
c431227e | 77 | README.rst \ |
4441a01c | 78 | NOTICE \ |
b1331295 | 79 | .cirrus.yml \ |
826bc7b6 | 80 | .travis.yml \ |
40a75bbf LR |
81 | .travis/linux-build.sh \ |
82 | .travis/linux-prepare.sh \ | |
83 | .travis/osx-build.sh \ | |
84 | .travis/osx-prepare.sh \ | |
12c96b8a | 85 | appveyor.yml \ |
0027492d | 86 | boot.sh \ |
6feddcd5 AA |
87 | poc/builders/Vagrantfile \ |
88 | poc/playbook-centos-builder.yml \ | |
e71ed35b | 89 | poc/playbook-fedora-builder.yml \ |
6feddcd5 | 90 | poc/playbook-ubuntu-builder.yml \ |
6ca37677 | 91 | $(MAN_FRAGMENTS) \ |
1ce96d2a | 92 | $(MAN_ROOTS) \ |
ef9c432c | 93 | Vagrantfile \ |
673b80ea RB |
94 | Vagrantfile-FreeBSD \ |
95 | .mailmap | |
064af421 BP |
96 | bin_PROGRAMS = |
97 | sbin_PROGRAMS = | |
98 | bin_SCRIPTS = | |
87103e1f | 99 | DIST_HOOKS = |
064af421 | 100 | dist_man_MANS = |
3b12adda | 101 | dist_pkgdata_DATA = |
064af421 BP |
102 | dist_pkgdata_SCRIPTS = |
103 | dist_sbin_SCRIPTS = | |
b2df0225 | 104 | dist_scripts_SCRIPTS = |
429ebf21 | 105 | dist_scripts_DATA = |
bef08169 | 106 | EXTRA_PROGRAMS = |
b2df0225 | 107 | INSTALL_DATA_LOCAL = |
44852fdf | 108 | UNINSTALL_LOCAL = |
064af421 | 109 | man_MANS = |
0027492d | 110 | MAN_FRAGMENTS = |
6ca37677 | 111 | MAN_ROOTS = |
c3bb4bd7 | 112 | noinst_DATA = |
064af421 | 113 | noinst_HEADERS = |
38b7a52b | 114 | lib_LTLIBRARIES = |
994bfc29 | 115 | noinst_LTLIBRARIES = |
045b2e5c | 116 | noinst_man_MANS = |
064af421 BP |
117 | noinst_PROGRAMS = |
118 | noinst_SCRIPTS = | |
00732bf5 | 119 | OVSIDL_BUILT = |
9c16ed64 | 120 | pkgdata_DATA = |
b2df0225 | 121 | sbin_SCRIPTS = |
43bb5f82 | 122 | scripts_SCRIPTS = |
2c9907cd | 123 | completion_SCRIPTS = |
429ebf21 | 124 | scripts_DATA = |
c3bb4bd7 | 125 | SUFFIXES = |
15b619e2 | 126 | check_DATA = |
08d42548 | 127 | check_SCRIPTS = |
81696de0 | 128 | pkgconfig_DATA = |
115d8719 | 129 | FLAKE8_PYFILES = |
064af421 | 130 | |
d4042a70 BP |
131 | if ENABLE_SPARSE_BY_DEFAULT |
132 | C ?= 1 | |
133 | endif | |
134 | ||
43bb5f82 | 135 | scriptsdir = $(pkgdatadir)/scripts |
2c9907cd | 136 | completiondir = $(sysconfdir)/bash_completion.d |
81696de0 | 137 | pkgconfigdir = $(libdir)/pkgconfig |
43bb5f82 | 138 | |
9741af79 BP |
139 | # This ensures that files added to EXTRA_DIST are always distributed, |
140 | # even if they are inside an Automake if...endif conditional block that is | |
141 | # disabled by some particular "configure" run. For more information, see: | |
142 | # http://article.gmane.org/gmane.comp.sysutils.automake.general/10891 | |
143 | noinst_HEADERS += $(EXTRA_DIST) | |
144 | ||
064af421 | 145 | ro_c = echo '/* -*- mode: c; buffer-read-only: t -*- */' |
cbaa4ffe | 146 | ro_shell = printf '\043 Generated automatically -- do not modify! -*- buffer-read-only: t -*-\n' |
064af421 | 147 | |
c3bb4bd7 | 148 | SUFFIXES += .in |
064af421 | 149 | .in: |
8e8b56d0 | 150 | $(AM_V_GEN)PYTHONPATH=$$PYTHONPATH$(psep)$(srcdir)/python $(PYTHON) $(srcdir)/build-aux/soexpand.py -I$(srcdir) < $< | \ |
dd6f26a9 | 151 | $(PYTHON) $(srcdir)/build-aux/dpdkstrip.py $(DPDKSTRIP_FLAGS) | \ |
aca1bb54 SF |
152 | sed \ |
153 | -e 's,[@]PKIDIR[@],$(PKIDIR),g' \ | |
154 | -e 's,[@]LOGDIR[@],$(LOGDIR),g' \ | |
155 | -e 's,[@]DBDIR[@],$(DBDIR),g' \ | |
aca1bb54 SF |
156 | -e 's,[@]PYTHON[@],$(PYTHON),g' \ |
157 | -e 's,[@]RUNDIR[@],$(RUNDIR),g' \ | |
158 | -e 's,[@]VERSION[@],$(VERSION),g' \ | |
159 | -e 's,[@]localstatedir[@],$(localstatedir),g' \ | |
160 | -e 's,[@]pkgdatadir[@],$(pkgdatadir),g' \ | |
161 | -e 's,[@]sysconfdir[@],$(sysconfdir),g' \ | |
162 | -e 's,[@]bindir[@],$(bindir),g' \ | |
163 | -e 's,[@]sbindir[@],$(sbindir),g' \ | |
164 | -e 's,[@]abs_builddir[@],$(abs_builddir),g' \ | |
165 | -e 's,[@]abs_top_srcdir[@],$(abs_top_srcdir),g' \ | |
166 | > $@.tmp | |
00961f7c | 167 | @if head -n 1 $@.tmp | grep '#!' > /dev/null; then \ |
aca1bb54 | 168 | chmod +x $@.tmp; \ |
3b135da3 | 169 | fi |
ef44aa50 | 170 | $(AM_V_at) mv $@.tmp $@ |
064af421 | 171 | |
99635791 BP |
172 | SUFFIXES += .xml |
173 | %: %.xml | |
174 | $(AM_V_GEN)$(run_python) $(srcdir)/build-aux/xml2nroff $< > $@.tmp \ | |
aca1bb54 SF |
175 | -I $(srcdir) \ |
176 | --version=$(VERSION) \ | |
177 | PKIDIR='$(PKIDIR)' \ | |
178 | LOGDIR='$(LOGDIR)' \ | |
179 | DBDIR='$(DBDIR)' \ | |
aca1bb54 SF |
180 | PYTHON='$(PYTHON)' \ |
181 | RUNDIR='$(RUNDIR)' \ | |
182 | VERSION='$(VERSION)' \ | |
183 | localstatedir='$(localstatedir)' \ | |
184 | pkgdatadir='$(pkgdatadir)' \ | |
185 | sysconfdir='$(sysconfdir)' \ | |
186 | bindir='$(bindir)' \ | |
187 | sbindir='$(sbindir)' | |
99635791 BP |
188 | $(AM_v_at)mv $@.tmp $@ |
189 | ||
79982e90 EJ |
190 | clean-pycov: |
191 | cd $(srcdir) && rm -f $(PYCOV_CLEAN_FILES) | |
192 | CLEAN_LOCAL += clean-pycov | |
099cf485 | 193 | .PHONY: clean-pycov |
79982e90 | 194 | |
87103e1f BP |
195 | # If we're checked out from a Git repository, make sure that every |
196 | # file that is in Git is distributed. | |
39376d06 BP |
197 | ALL_LOCAL += dist-hook-git |
198 | dist-hook-git: distfiles | |
199 | @if test -e $(srcdir)/.git && (git --version) >/dev/null 2>&1; then \ | |
aca1bb54 SF |
200 | (cd datapath && $(MAKE) distfiles); \ |
201 | (cat distfiles; sed 's|^|datapath/|' datapath/distfiles) | \ | |
202 | LC_ALL=C sort -u > all-distfiles; \ | |
203 | (cd $(srcdir) && git ls-files) | grep -v '\.gitignore$$' | \ | |
3c921cc2 | 204 | grep -v '\.gitattributes$$' | \ |
aca1bb54 | 205 | LC_ALL=C sort -u > all-gitfiles; \ |
a6da6967 | 206 | LC_ALL=C comm -1 -3 all-distfiles all-gitfiles > missing-distfiles; \ |
aca1bb54 | 207 | if test -s missing-distfiles; then \ |
4207d631 | 208 | echo "The following files are in git but not the distribution:"; \ |
aca1bb54 SF |
209 | cat missing-distfiles; \ |
210 | exit 1; \ | |
211 | fi; \ | |
939f4522 BP |
212 | if LC_ALL=C grep '\.gitignore$$' all-distfiles; then \ |
213 | echo "See above for list of files that are distributed but"; \ | |
214 | echo "should not be."; \ | |
215 | exit 1; \ | |
216 | fi \ | |
87103e1f | 217 | fi |
39376d06 BP |
218 | CLEANFILES += all-distfiles all-gitfiles missing-distfiles |
219 | # The following is based on commands for the Automake "distdir" target. | |
220 | distfiles: Makefile | |
221 | @srcdirstrip=`echo "$(srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | |
222 | topsrcdirstrip=`echo "$(top_srcdir)" | sed 's/[].[^$$\\*]/\\\\&/g'`; \ | |
223 | list='$(DISTFILES)'; \ | |
224 | for file in $$list; do echo $$file; done | \ | |
225 | sed -e "s|^$$srcdirstrip/||;t" \ | |
a6da6967 | 226 | -e "s|^$$topsrcdirstrip/|$(top_builddir)/|;t" | \ |
aca1bb54 | 227 | LC_ALL=C sort -u > $@ |
39376d06 | 228 | CLEANFILES += distfiles |
b4e1bf8b | 229 | .PHONY: dist-hook-git |
87103e1f | 230 | |
9e4ba008 BP |
231 | # Check that every .c file includes <config.h>. |
232 | ALL_LOCAL += config-h-check | |
233 | config-h-check: | |
234 | @cd $(srcdir); \ | |
235 | if test -e .git && (git --version) >/dev/null 2>&1 && \ | |
aca1bb54 SF |
236 | git --no-pager grep -L '#include <config\.h>' `git ls-files | grep '\.c$$' | \ |
237 | grep -vE '^datapath|^lib/sflow|^third-party|^datapath-windows|^python'`; \ | |
9e4ba008 | 238 | then \ |
aca1bb54 SF |
239 | echo "See above for list of violations of the rule that"; \ |
240 | echo "every C source file must #include <config.h>."; \ | |
241 | exit 1; \ | |
f7e6e24c TR |
242 | fi; \ |
243 | if grep '#include' include/openvswitch/*.h | \ | |
c458e4a3 YHW |
244 | grep -vE '(<.*>)|("openvswitch)|("openflow)'; \ |
245 | then \ | |
246 | echo "See above for list of violations of the rule that"; \ | |
247 | echo "public openvswitch header file should not include internal library."; \ | |
248 | exit 1; \ | |
249 | fi | |
9e4ba008 BP |
250 | .PHONY: config-h-check |
251 | ||
34582733 AS |
252 | # Check for printf() type modifiers that MSVC doesn't support. |
253 | ALL_LOCAL += printf-check | |
254 | printf-check: | |
8faeab72 DDP |
255 | @cd $(srcdir); \ |
256 | if test -e .git && (git --version) >/dev/null 2>&1 && \ | |
aca1bb54 SF |
257 | git --no-pager grep -n -E -e '%[-+ #0-9.*]*([ztj]|hh)' --and --not -e 'ovs_scan' `git ls-files | grep '\.[ch]$$' | \ |
258 | grep -vE '^datapath|^lib/sflow|^third-party'`; \ | |
34582733 | 259 | then \ |
aca1bb54 SF |
260 | echo "See above for list of violations of the rule that"; \ |
261 | echo "'z', 't', 'j', 'hh' printf() type modifiers are"; \ | |
692ac452 | 262 | echo "forbidden. See coding-style.rst for replacements."; \ |
aca1bb54 | 263 | exit 1; \ |
34582733 AS |
264 | fi |
265 | .PHONY: printf-check | |
266 | ||
1514b275 BP |
267 | # Check that certain data structures are always declared "static". |
268 | ALL_LOCAL += static-check | |
269 | static-check: | |
db5ce514 | 270 | @if test -e $(srcdir)/.git && (git --version) >/dev/null 2>&1 && \ |
aca1bb54 SF |
271 | git --no-pager grep -n -E '^[ ]+(struct vlog_rate_limit|pthread_once_t|struct ovsthread_once).*=' $(srcdir); \ |
272 | then \ | |
273 | echo "See above for list of violations of the rule that "; \ | |
274 | echo "certain data structures must always be 'static'"; \ | |
275 | exit 1; \ | |
276 | fi | |
1514b275 | 277 | .PHONY: static-check |
db5ce514 | 278 | |
4958e3ee BP |
279 | # Check that assert.h is not used outside a whitelist of files. |
280 | ALL_LOCAL += check-assert-h-usage | |
281 | check-assert-h-usage: | |
282 | @if test -e $(srcdir)/.git && (git --version) >/dev/null 2>&1 && \ | |
aca1bb54 SF |
283 | (cd $(srcdir) && git --no-pager grep -l -E '[<]assert.h[>]') | \ |
284 | $(EGREP) -v '^lib/(sflow_receiver|vlog).c$$|^tests/'; \ | |
285 | then \ | |
286 | echo "Files listed above unexpectedly #include <""assert.h"">."; \ | |
287 | echo "Please use ovs_assert (from util.h) instead of assert."; \ | |
288 | exit 1; \ | |
289 | fi | |
4958e3ee BP |
290 | .PHONY: check-assert-h-usage |
291 | ||
64746850 BP |
292 | # Check that LITTLE_ENDIAN and BIG_ENDIAN are not used unless BYTE_ORDER is |
293 | # also mentioned. (<endian.h> always defines the former two constants. They | |
294 | # must be compared to BYTE_ORDER to get the machine's correct endianness. But | |
295 | # it is better to use WORDS_BIGENDIAN.) | |
296 | ALL_LOCAL += check-endian | |
297 | check-endian: | |
298 | @if test -e $(srcdir)/.git && (git --version) >/dev/null 2>&1 && \ | |
aca1bb54 SF |
299 | (cd $(srcdir) && git --no-pager grep -l -E \ |
300 | -e 'BIG_ENDIAN|LITTLE_ENDIAN' --and --not -e 'BYTE_ORDER' | \ | |
7a2ce387 | 301 | $(EGREP) -v '^datapath/|^include/sparse/rte_'); \ |
aca1bb54 SF |
302 | then \ |
303 | echo "See above for list of files that misuse LITTLE""_ENDIAN"; \ | |
304 | echo "or BIG""_ENDIAN. Please use WORDS_BIGENDIAN instead."; \ | |
305 | exit 1; \ | |
306 | fi | |
64746850 BP |
307 | .PHONY: check-endian |
308 | ||
45a9c31d BP |
309 | ALL_LOCAL += check-echo-n |
310 | check-echo-n: | |
311 | @if test -e $(srcdir)/.git && (git --version) >/dev/null 2>&1 && \ | |
312 | git --no-pager grep -n 'echo'' -n' $(srcdir); \ | |
313 | then \ | |
314 | echo "See above for uses for \"echo"" -n\", which is non-POSIX"; \ | |
315 | echo "and does not work with all shells. Use \"printf\" instead."; \ | |
316 | exit 1; \ | |
317 | fi | |
318 | .PHONY: check-echo-n | |
319 | ||
7717d233 BP |
320 | ALL_LOCAL += check-tabs |
321 | check-tabs: | |
322 | @cd $(srcdir); \ | |
323 | if test -e .git && (git --version) >/dev/null 2>&1 && \ | |
324 | grep -ln "^ " \ | |
325 | `git ls-files \ | |
326 | | grep -v -f build-aux/initial-tab-whitelist` /dev/null \ | |
327 | | $(EGREP) -v ':[ ]*/?\*'; \ | |
328 | then \ | |
329 | echo "See above for files that use tabs for indentation."; \ | |
330 | echo "Please use spaces instead."; \ | |
331 | exit 1; \ | |
332 | fi | |
333 | .PHONY: check-tabs | |
334 | ||
6a3e30f3 BP |
335 | ALL_LOCAL += thread-safety-check |
336 | thread-safety-check: | |
8faeab72 DDP |
337 | @cd $(srcdir); \ |
338 | if test -e .git && (git --version) >/dev/null 2>&1 && \ | |
aca1bb54 SF |
339 | grep -n -f build-aux/thread-safety-blacklist \ |
340 | `git ls-files | grep '\.[ch]$$' \ | |
341 | | $(EGREP) -v '^datapath|^lib/sflow|^third-party'` /dev/null \ | |
342 | | $(EGREP) -v ':[ ]*/?\*'; \ | |
6a3e30f3 | 343 | then \ |
aca1bb54 SF |
344 | echo "See above for list of calls to functions that are"; \ |
345 | echo "blacklisted due to thread safety issues"; \ | |
346 | exit 1; \ | |
6a3e30f3 BP |
347 | fi |
348 | EXTRA_DIST += build-aux/thread-safety-blacklist | |
c9172561 | 349 | .PHONY: thread-safety-check |
6a3e30f3 | 350 | |
0b2c7e69 BP |
351 | # Check that "ip" is used in preference to "ifconfig", because |
352 | # "ifconfig" is not installed ubiquitously anymore. | |
353 | ALL_LOCAL += check-ifconfig | |
354 | check-ifconfig: | |
355 | @if test -e $(srcdir)/.git && (git --version) >/dev/null 2>&1 && \ | |
356 | (cd $(srcdir) && git --no-pager grep -l -E -e 'ifconfig' | \ | |
357 | $(EGREP) -v 'Makefile.am|ovs-vsctl-bashcomp|openvswitch-custom\.te'); \ | |
358 | then \ | |
359 | echo "See above for list of files that use or reference"; \ | |
360 | echo "'ifconfig'. Please use 'ip' instead."; \ | |
361 | exit 1; \ | |
362 | fi | |
363 | .PHONY: check-ifconfig | |
364 | ||
0027492d BP |
365 | if HAVE_GROFF |
366 | ALL_LOCAL += manpage-check | |
1261619f BP |
367 | manpage-check: $(man_MANS) $(dist_man_MANS) $(noinst_man_MANS) |
368 | @error=false; \ | |
369 | for manpage in $?; do \ | |
aca1bb54 SF |
370 | LANG=en_US.UTF-8 groff -w mac -w delim -w escape -w input -w missing -w tab -T utf8 -man -p -z $$manpage >$@.tmp 2>&1; \ |
371 | if grep warning: $@.tmp; then error=:; fi; \ | |
372 | rm -f $@.tmp; \ | |
0027492d | 373 | done; \ |
be09aa10 EJ |
374 | if $$error; then exit 1; else touch $@; fi |
375 | $(AM_V_GEN) touch -c $@ | |
0027492d BP |
376 | CLEANFILES += manpage-check |
377 | endif | |
378 | ||
115d8719 RB |
379 | if HAVE_FLAKE8 |
380 | ALL_LOCAL += flake8-check | |
ba2c7e01 | 381 | # http://flake8.readthedocs.org/en/latest/user/error-codes.html |
f3068bff RB |
382 | # All warnings explicitly selected or ignored should be listed below. |
383 | # | |
384 | # E***, W*** -- warnings from pep8 | |
385 | # E121 continuation line under-indented for hanging indent (only from flake8 v2.0) | |
386 | # E123 closing bracket does not match indentation of opening bracket's line | |
387 | # E125 continuation line with same indent as next logical line (only from flake8 v2.0) | |
388 | # E126 continuation line over-indented for hanging indent | |
389 | # E127 continuation line over-indented for visual indent | |
390 | # E128 continuation line under-indented for visual indent | |
391 | # E129 visually indented line with same indent as next logical line | |
392 | # E131 continuation line unaligned for hanging indent | |
ba2c7e01 | 393 | # E722 do not use bare except, specify exception instead |
f3068bff RB |
394 | # W503 line break before binary operator |
395 | # F*** -- warnings native to flake8 | |
396 | # F811 redefinition of unused <name> from line <N> (only from flake8 v2.0) | |
007ec24d NS |
397 | # D*** -- warnings from flake8-docstrings plugin |
398 | # H*** -- warnings from flake8 hacking plugin (custom style checks beyond PEP8) | |
f3068bff | 399 | # H231 Python 3.x incompatible 'except x,y:' construct |
56ec0611 | 400 | # H232 Python 3.x incompatible octal 077 should be written as 0o77 |
8ea171ab | 401 | # H233 Python 3.x incompatible use of print operator |
03756304 | 402 | # H238 old style class declaration, use new style (inherit from `object`) |
aca1bb54 | 403 | FLAKE8_SELECT = H231,H232,H233,H238 |
ba2c7e01 | 404 | FLAKE8_IGNORE = E121,E123,E125,E126,E127,E128,E129,E131,E722,W503,F811,D,H,I |
115d8719 | 405 | flake8-check: $(FLAKE8_PYFILES) |
308bf988 | 406 | $(FLAKE8_WERROR)$(AM_V_GEN) \ |
aca1bb54 SF |
407 | src='$^' && \ |
408 | flake8 $$src --select=$(FLAKE8_SELECT) $(FLAKE8_FLAGS) && \ | |
409 | flake8 $$src --ignore=$(FLAKE8_IGNORE) $(FLAKE8_FLAGS) && \ | |
410 | touch $@ | |
115d8719 | 411 | endif |
968eec59 | 412 | CLEANFILES += flake8-check |
115d8719 | 413 | |
6ca37677 | 414 | include $(srcdir)/manpages.mk |
de987222 | 415 | $(srcdir)/manpages.mk: $(MAN_ROOTS) build-aux/sodepends.py python/build/soutil.py |
8e8b56d0 | 416 | @PYTHONPATH=$$PYTHONPATH$(psep)$(srcdir)/python $(PYTHON) $(srcdir)/build-aux/sodepends.py -I. -I$(srcdir) $(MAN_ROOTS) >$(@F).tmp |
6ca37677 | 417 | @if cmp -s $(@F).tmp $@; then \ |
aca1bb54 SF |
418 | touch $@; \ |
419 | rm -f $(@F).tmp; \ | |
6ca37677 | 420 | else \ |
aca1bb54 | 421 | mv $(@F).tmp $@; \ |
6ca37677 BP |
422 | fi |
423 | CLEANFILES += manpage-dep-check | |
424 | ||
bd9d7025 | 425 | if VSTUDIO_DDK |
e02b8fb0 | 426 | ALL_LOCAL += ovsext |
845e6884 | 427 | ARCH = x64 |
e02b8fb0 | 428 | ovsext: datapath-windows/ovsext.sln $(srcdir)/datapath-windows/include/OvsDpInterface.h |
b1db9dd6 | 429 | if VSTUDIO_WIN8 |
845e6884 | 430 | MSBuild.exe //nologo //maxcpucount datapath-windows/ovsext.sln /target:Build /property:Configuration="Win8$(VSTUDIO_CONFIG)" /property:Version="$(PACKAGE_VERSION)" //p:Platform=$(ARCH) |
b1db9dd6 SR |
431 | endif |
432 | if VSTUDIO_WIN8_1 | |
845e6884 | 433 | MSBuild.exe //nologo //maxcpucount datapath-windows/ovsext.sln /target:Build /property:Configuration="Win8.1$(VSTUDIO_CONFIG)" /property:Version="$(PACKAGE_VERSION)" //p:Platform=$(ARCH) |
b1db9dd6 SR |
434 | endif |
435 | if VSTUDIO_WIN10 | |
436 | MSBuild.exe //nologo //maxcpucount datapath-windows/ovsext.sln /target:Build /property:Configuration="Win10$(VSTUDIO_CONFIG)" /property:Version="$(PACKAGE_VERSION)" //p:Platform=$(ARCH) | |
437 | endif | |
438 | ||
bd9d7025 AS |
439 | |
440 | CLEAN_LOCAL += ovsext_clean | |
441 | ovsext_clean: datapath-windows/ovsext.sln | |
b1db9dd6 | 442 | if VSTUDIO_WIN8 |
845e6884 | 443 | MSBuild.exe //nologo //maxcpucount datapath-windows/ovsext.sln /target:Clean /property:Configuration="Win8$(VSTUDIO_CONFIG)" /property:Version="$(PACKAGE_VERSION)" //p:Platform=$(ARCH) |
b1db9dd6 SR |
444 | endif |
445 | if VSTUDIO_WIN8_1 | |
845e6884 | 446 | MSBuild.exe //nologo //maxcpucount datapath-windows/ovsext.sln /target:Clean /property:Configuration="Win8.1$(VSTUDIO_CONFIG)" /property:Version="$(PACKAGE_VERSION)" //p:Platform=$(ARCH) |
bd9d7025 | 447 | endif |
b1db9dd6 SR |
448 | if VSTUDIO_WIN10 |
449 | MSBuild.exe //nologo //maxcpucount datapath-windows/ovsext.sln /target:Clean /property:Configuration="Win10$(VSTUDIO_CONFIG)" /property:Version="$(PACKAGE_VERSION)" //p:Platform=$(ARCH) | |
450 | endif | |
451 | endif | |
e02b8fb0 | 452 | .PHONY: ovsext |
bd9d7025 | 453 | |
30b79363 BB |
454 | clang-analyze: clean |
455 | @which clang scan-build >/dev/null 2>&1 || \ | |
aca1bb54 | 456 | (echo "Unable to find clang/scan-build, Install clang,clang-analyzer packages"; exit 1) |
30b79363 BB |
457 | @$(MKDIR_P) "$(srcdir)/tests/clang-analyzer-results" |
458 | @scan-build -o $(srcdir)/tests/clang-analyzer-results --use-cc=$(CC) $(MAKE) | |
459 | .PHONY: clang-analyze | |
460 | ||
87103e1f | 461 | dist-hook: $(DIST_HOOKS) |
22c79496 | 462 | all-local: $(ALL_LOCAL) |
15b619e2 | 463 | clean-local: $(CLEAN_LOCAL) |
b2df0225 | 464 | install-data-local: $(INSTALL_DATA_LOCAL) |
44852fdf BP |
465 | uninstall-local: $(UNINSTALL_LOCAL) |
466 | .PHONY: $(DIST_HOOKS) $(CLEAN_LOCAL) $(INSTALL_DATA_LOCAL) $(UNINSTALL_LOCAL) | |
87103e1f | 467 | |
3a14d239 BP |
468 | modules_install: |
469 | if LINUX_ENABLED | |
470 | cd datapath/linux && $(MAKE) modules_install | |
471 | endif | |
472 | ||
4441a01c | 473 | dist-docs: |
6b304335 | 474 | VERSION=$(VERSION) MAKE='$(MAKE)' $(srcdir)/build-aux/dist-docs $(srcdir) $(docs) |
4441a01c BP |
475 | .PHONY: dist-docs |
476 | ||
8c254406 | 477 | include Documentation/automake.mk |
ed1be787 | 478 | include m4/automake.mk |
064af421 | 479 | include lib/automake.mk |
8cd4882f | 480 | include ofproto/automake.mk |
064af421 BP |
481 | include utilities/automake.mk |
482 | include tests/automake.mk | |
483 | include include/automake.mk | |
484 | include third-party/automake.mk | |
485 | include debian/automake.mk | |
22c5eafb | 486 | include ipsec/automake.mk |
064af421 | 487 | include vswitchd/automake.mk |
f85f8ebb | 488 | include ovsdb/automake.mk |
c434706a | 489 | include rhel/automake.mk |
064af421 | 490 | include xenserver/automake.mk |
0be6140a | 491 | include python/automake.mk |
eeecce05 | 492 | include tutorial/automake.mk |
add17b69 | 493 | include vtep/automake.mk |
c803536e | 494 | include datapath-windows/automake.mk |
c640e3ce | 495 | include datapath-windows/include/automake.mk |
d183efc2 | 496 | include windows/automake.mk |
fe36184b | 497 | include ovn/automake.mk |
9b897c91 | 498 | include selinux/automake.mk |
e522804f | 499 | include build-aux/automake.mk |