python: Resolve some indentation warnings.
[cascardo/ovs.git] / Makefile.am
index 178e82c..b9b8e71 100644 (file)
@@ -19,6 +19,7 @@ AM_CPPFLAGS += -I $(top_srcdir)/datapath-windows/include
 AM_CPPFLAGS += $(PTHREAD_INCLUDES)
 AM_CPPFLAGS += $(MSVC_CFLAGS)
 AM_LDFLAGS += $(PTHREAD_LDFLAGS)
+AM_LDFLAGS += $(MSVC64_LDFLAGS)
 endif
 
 AM_CPPFLAGS += -I $(top_srcdir)/include
@@ -51,13 +52,9 @@ endif
 # vSwitch, but it causes trouble if you switch from a version with
 # foo/__init__.py into an (older) version with plain foo.py, since
 # foo/__init__.pyc will cause Python to ignore foo.py.
-if INCLUDE_PYTHON_COMPAT
-run_python = PYTHONPATH=$(top_srcdir)/python$(psep)$(top_srcdir)/python/compat$(psep)$$PYTHONPATH
-else
-run_python = PYTHONPATH=$(top_srcdir)/python$(psep)$$PYTHONPATH
-endif
-run_python += PYTHONDONTWRITEBYTECODE=yes $(PYTHON)
-
+run_python = \
+       PYTHONPATH=$(top_srcdir)/python$(psep)$$PYTHONPATH \
+       PYTHONDONTWRITEBYTECODE=yes $(PYTHON)
 
 ALL_LOCAL =
 BUILT_SOURCES =
@@ -69,7 +66,6 @@ PYCOV_CLEAN_FILES = build-aux/check-structs,cover
 # A list of Markdown-formatted documentation that will automatically be
 # included in the "make dist-docs" output.
 docs = \
-       appveyor.yml \
        CONTRIBUTING.md \
        CodingStyle.md \
        DESIGN.md \
@@ -103,8 +99,10 @@ EXTRA_DIST = \
        .travis.yml \
        .travis/build.sh \
        .travis/prepare.sh \
+       appveyor.yml \
        boot.sh \
        build-aux/cccl \
+       build-aux/cksum-schema-check \
        build-aux/dist-docs \
        build-aux/sodepends.pl \
        build-aux/soexpand.pl \
@@ -143,6 +141,7 @@ SUFFIXES =
 check_DATA =
 check_SCRIPTS =
 pkgconfig_DATA =
+FLAKE8_PYFILES =
 
 scriptsdir = $(pkgdatadir)/scripts
 completiondir = $(sysconfdir)/bash_completion.d
@@ -181,6 +180,24 @@ SUFFIXES += .in
        fi
        $(AM_V_at) mv $@.tmp $@
 
+SUFFIXES += .xml
+%: %.xml
+       $(AM_V_GEN)$(run_python) $(srcdir)/build-aux/xml2nroff $< > $@.tmp \
+               --version=$(VERSION) \
+               PKIDIR='$(PKIDIR)' \
+               LOGDIR='$(LOGDIR)' \
+               DBDIR='$(DBDIR)' \
+               PERL='$(PERL)' \
+               PYTHON='$(PYTHON)' \
+               RUNDIR='$(RUNDIR)' \
+               VERSION='$(VERSION)' \
+               localstatedir='$(localstatedir)' \
+               pkgdatadir='$(pkgdatadir)' \
+               sysconfdir='$(sysconfdir)' \
+               bindir='$(bindir)' \
+               sbindir='$(sbindir)'
+       $(AM_v_at)mv $@.tmp $@
+
 .PHONY: clean-pycov
 clean-pycov:
        cd $(srcdir) && rm -f $(PYCOV_CLEAN_FILES)
@@ -307,6 +324,7 @@ thread-safety-check:
            exit 1; \
        fi
 EXTRA_DIST += build-aux/thread-safety-blacklist
+.PHONY: thread-safety-check
 
 if HAVE_GROFF
 ALL_LOCAL += manpage-check
@@ -322,6 +340,19 @@ manpage-check: $(man_MANS) $(dist_man_MANS) $(noinst_man_MANS)
 CLEANFILES += manpage-check
 endif
 
+if HAVE_FLAKE8
+ALL_LOCAL += flake8-check
+# E123 closing bracket does not match indentation of opening bracket's line
+# E126 continuation line over-indented for hanging indent
+# E127 continuation line over-indented for visual indent
+# E128 continuation line under-indented for visual indent
+# E129 visually indented line with same indent as next logical line
+# E131 continuation line unaligned for hanging indent
+# E501 line too long (80 > 79 characters)
+flake8-check: $(FLAKE8_PYFILES)
+       $(AM_V_GEN) if flake8 $^ --ignore=E123,E126,E127,E128,E129,E131,E501 ${FLAKE8_FLAGS}; then touch $@; else exit 1; fi
+endif
+
 include $(srcdir)/manpages.mk
 $(srcdir)/manpages.mk: $(MAN_ROOTS) build-aux/sodepends.pl
        @$(PERL) $(srcdir)/build-aux/sodepends.pl -I. -I$(srcdir) $(MAN_ROOTS) >$(@F).tmp
@@ -344,6 +375,7 @@ ovsext_clean: datapath-windows/ovsext.sln
        MSBuild.exe datapath-windows/ovsext.sln /target:Clean /property:Configuration="Win8$(VSTUDIO_CONFIG)"
        MSBuild.exe datapath-windows/ovsext.sln /target:Clean /property:Configuration="Win8.1$(VSTUDIO_CONFIG)"
 endif
+.PHONY: ovsext_make
 
 dist-hook: $(DIST_HOOKS)
 all-local: $(ALL_LOCAL)
@@ -375,7 +407,6 @@ include ovsdb/automake.mk
 include rhel/automake.mk
 include xenserver/automake.mk
 include python/automake.mk
-include python/compat/automake.mk
 include tutorial/automake.mk
 include vtep/automake.mk
 include datapath-windows/automake.mk