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