Add OXM_OF_* definitions
[openvswitch] / python / automake.mk
1 run_python = PYTHONPATH=$(top_srcdir)/python:$$PYTHON_PATH $(PYTHON)
2
3 ovstest_pyfiles = \
4         python/ovstest/__init__.py \
5         python/ovstest/args.py \
6         python/ovstest/rpcserver.py \
7         python/ovstest/tcp.py \
8         python/ovstest/udp.py \
9         python/ovstest/util.py \
10         python/ovstest/vswitch.py
11
12 ovs_pyfiles = \
13         python/ovs/__init__.py \
14         python/ovs/daemon.py \
15         python/ovs/db/__init__.py \
16         python/ovs/db/data.py \
17         python/ovs/db/error.py \
18         python/ovs/db/idl.py \
19         python/ovs/db/parser.py \
20         python/ovs/db/schema.py \
21         python/ovs/db/types.py \
22         python/ovs/fatal_signal.py \
23         python/ovs/json.py \
24         python/ovs/jsonrpc.py \
25         python/ovs/ovsuuid.py \
26         python/ovs/poller.py \
27         python/ovs/process.py \
28         python/ovs/reconnect.py \
29         python/ovs/socket_util.py \
30         python/ovs/stream.py \
31         python/ovs/timeval.py \
32         python/ovs/unixctl.py \
33         python/ovs/util.py \
34         python/ovs/version.py \
35         python/ovs/vlog.py
36
37 PYFILES = $(ovs_pyfiles) python/ovs/dirs.py $(ovstest_pyfiles)
38 EXTRA_DIST += $(PYFILES)
39 PYCOV_CLEAN_FILES += $(PYFILES:.py=.py,cover)
40
41 if HAVE_PYTHON
42 nobase_pkgdata_DATA = $(ovs_pyfiles) $(ovstest_pyfiles)
43 ovs-install-data-local:
44         $(MKDIR_P) python/ovs
45         (echo "import os" && \
46          echo 'PKGDATADIR = os.environ.get("OVS_PKGDATADIR", """$(pkgdatadir)""")' && \
47          echo 'RUNDIR = os.environ.get("OVS_RUNDIR", """@RUNDIR@""")' && \
48          echo 'LOGDIR = os.environ.get("OVS_LOGDIR", """@LOGDIR@""")' && \
49          echo 'BINDIR = os.environ.get("OVS_BINDIR", """$(bindir)""")') \
50                 > python/ovs/dirs.py.tmp
51         $(MKDIR_P) $(DESTDIR)$(pkgdatadir)/python/ovs
52         $(INSTALL_DATA) python/ovs/dirs.py.tmp $(DESTDIR)$(pkgdatadir)/python/ovs/dirs.py
53         rm python/ovs/dirs.py.tmp
54 else
55 ovs-install-data-local:
56         @:
57 endif
58 install-data-local: ovs-install-data-local
59
60 UNINSTALL_LOCAL += ovs-uninstall-local
61 ovs-uninstall-local:
62         rm -f $(DESTDIR)$(pkgdatadir)/python/ovs/dirs.py
63
64 ALL_LOCAL += $(srcdir)/python/ovs/version.py
65 $(srcdir)/python/ovs/version.py: config.status
66         $(ro_shell) > $(@F).tmp
67         echo 'VERSION = "$(VERSION)"' >> $(@F).tmp
68         if cmp -s $(@F).tmp $@; then touch $@; rm $(@F).tmp; else mv $(@F).tmp $@; fi