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