netdev-dpdk: fix mbuf leaks
[cascardo/ovs.git] / python / automake.mk
1 ovstest_pyfiles = \
2         python/ovstest/__init__.py \
3         python/ovstest/args.py \
4         python/ovstest/rpcserver.py \
5         python/ovstest/tcp.py \
6         python/ovstest/tests.py \
7         python/ovstest/udp.py \
8         python/ovstest/util.py \
9         python/ovstest/vswitch.py
10
11 ovs_pyfiles = \
12         python/ovs/__init__.py \
13         python/ovs/daemon.py \
14         python/ovs/db/__init__.py \
15         python/ovs/db/data.py \
16         python/ovs/db/error.py \
17         python/ovs/db/idl.py \
18         python/ovs/db/parser.py \
19         python/ovs/db/schema.py \
20         python/ovs/db/types.py \
21         python/ovs/fatal_signal.py \
22         python/ovs/json.py \
23         python/ovs/jsonrpc.py \
24         python/ovs/ovsuuid.py \
25         python/ovs/poller.py \
26         python/ovs/process.py \
27         python/ovs/reconnect.py \
28         python/ovs/socket_util.py \
29         python/ovs/stream.py \
30         python/ovs/timeval.py \
31         python/ovs/unixctl/__init__.py \
32         python/ovs/unixctl/client.py \
33         python/ovs/unixctl/server.py \
34         python/ovs/util.py \
35         python/ovs/version.py \
36         python/ovs/vlog.py
37
38 # These python files are used at build time but not runtime,
39 # so they are not installed.
40 EXTRA_DIST += \
41         python/build/__init__.py \
42         python/build/nroff.py
43
44 # PyPI support.
45 EXTRA_DIST += \
46         python/README.rst \
47         python/setup.py
48
49 PYFILES = $(ovs_pyfiles) python/ovs/dirs.py $(ovstest_pyfiles)
50 EXTRA_DIST += $(PYFILES)
51 PYCOV_CLEAN_FILES += $(PYFILES:.py=.py,cover)
52
53 FLAKE8_PYFILES += \
54         $(filter-out python/ovs/dirs.py,$(PYFILES)) \
55         python/setup.py \
56         python/build/__init__.py \
57         python/build/nroff.py \
58         python/ovs/dirs.py.template
59
60 if HAVE_PYTHON
61 nobase_pkgdata_DATA = $(ovs_pyfiles) $(ovstest_pyfiles)
62 ovs-install-data-local:
63         $(MKDIR_P) python/ovs
64         sed \
65                 -e '/^##/d' \
66                 -e 's,[@]pkgdatadir[@],$(pkgdatadir),g' \
67                 -e 's,[@]RUNDIR[@],$(RUNDIR),g' \
68                 -e 's,[@]LOGDIR[@],$(LOGDIR),g' \
69                 -e 's,[@]bindir[@],$(bindir),g' \
70                 -e 's,[@]sysconfdir[@],$(sysconfdir),g' \
71                 -e 's,[@]DBDIR[@],$(DBDIR),g' \
72                 < $(srcdir)/python/ovs/dirs.py.template \
73                 > python/ovs/dirs.py.tmp
74         $(MKDIR_P) $(DESTDIR)$(pkgdatadir)/python/ovs
75         $(INSTALL_DATA) python/ovs/dirs.py.tmp $(DESTDIR)$(pkgdatadir)/python/ovs/dirs.py
76         rm python/ovs/dirs.py.tmp
77
78 python-sdist: $(srcdir)/python/ovs/version.py $(ovs_pyfiles) python/ovs/dirs.py
79         (cd python/ && $(PYTHON) setup.py sdist)
80
81 pypi-upload: $(srcdir)/python/ovs/version.py $(ovs_pyfiles) python/ovs/dirs.py
82         (cd python/ && $(PYTHON) setup.py sdist upload)
83 else
84 ovs-install-data-local:
85         @:
86 endif
87 install-data-local: ovs-install-data-local
88
89 UNINSTALL_LOCAL += ovs-uninstall-local
90 ovs-uninstall-local:
91         rm -f $(DESTDIR)$(pkgdatadir)/python/ovs/dirs.py
92
93 ALL_LOCAL += $(srcdir)/python/ovs/version.py
94 $(srcdir)/python/ovs/version.py: config.status
95         $(AM_V_GEN)$(ro_shell) > $(@F).tmp && \
96         echo 'VERSION = "$(VERSION)"' >> $(@F).tmp && \
97         if cmp -s $(@F).tmp $@; then touch $@; rm $(@F).tmp; else mv $(@F).tmp $@; fi
98
99 ALL_LOCAL += $(srcdir)/python/ovs/dirs.py
100 $(srcdir)/python/ovs/dirs.py: python/ovs/dirs.py.template
101         $(AM_V_GEN)sed \
102                 -e '/^##/d' \
103                 -e 's,[@]pkgdatadir[@],/usr/local/share/openvswitch,g' \
104                 -e 's,[@]RUNDIR[@],/var/run,g' \
105                 -e 's,[@]LOGDIR[@],/usr/local/var/log,g' \
106                 -e 's,[@]bindir[@],/usr/local/bin,g' \
107                 -e 's,[@]sysconfdir[@],/usr/local/etc,g' \
108                 -e 's,[@]DBDIR[@],/usr/local/etc/openvswitch,g' \
109                 < $? > $@.tmp && \
110         mv $@.tmp $@
111 EXTRA_DIST += python/ovs/dirs.py.template