diff options
author | Ben Pfaff <blp@ovn.org> | 2017-07-06 15:12:00 -0700 |
---|---|---|
committer | Ben Pfaff <blp@ovn.org> | 2017-07-07 09:21:40 -0700 |
commit | 308bf9880826bb717a271e5128326ef2fbb903c0 (patch) | |
tree | 54895b50b5fd7594ede5097a74c4060e0b8f15b7 /Makefile.am | |
parent | ecbc687cbcdbbd8af16d438e2eb4e4d9cfe25eb8 (diff) | |
download | openvswitch-308bf9880826bb717a271e5128326ef2fbb903c0.tar.gz |
Makefiles: Fail build for flake8 only when configured with --enable-Werror.
flake8 checking is useful. Until now, it always failed the build for any
flake8 errors. This is too aggressive, for the same reason that always
failing the build for any compiler warnings is too aggressive: compilers
change over time and asynchronously from OVS itself. Thus, if we release
some version of OVS today, even if it's flake8-clean today, it might not
be flake8-clean tomorrow, even with the same settings. We don't want to
have to track flake8 warnings on every release branch.
Thus, this adopts the same policy for compiler warnings: always report
them, but only fail the build if --enable-Werror was configured. Usually
just developers use that configure option, and they're prepared to deal
with the fallout.
Signed-off-by: Ben Pfaff <blp@ovn.org>
Acked-by: Russell Bryant <russell@ovn.org>
Diffstat (limited to 'Makefile.am')
-rw-r--r-- | Makefile.am | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile.am b/Makefile.am index d810a5e72..7e11e04ac 100644 --- a/Makefile.am +++ b/Makefile.am @@ -365,7 +365,7 @@ ALL_LOCAL += flake8-check FLAKE8_SELECT = H231,H232,H233,H238 FLAKE8_IGNORE = E121,E123,E125,E126,E127,E128,E129,E131,W503,F811,D,H,I flake8-check: $(FLAKE8_PYFILES) - $(AM_V_GEN) \ + $(FLAKE8_WERROR)$(AM_V_GEN) \ src='$^' && \ flake8 $$src --select=$(FLAKE8_SELECT) $(FLAKE8_FLAGS) && \ flake8 $$src --ignore=$(FLAKE8_IGNORE) $(FLAKE8_FLAGS) && \ |