diff options
| author | Ben Pfaff <blp@nicira.com> | 2010-11-29 12:28:26 -0800 |
|---|---|---|
| committer | Ben Pfaff <blp@nicira.com> | 2010-11-29 16:29:11 -0800 |
| commit | b43c6fe279a5630dfbc0273e06bd1e8ca530ba35 (patch) | |
| tree | 0b3ccc94c79b5058006a0deb88e322364fd4232b /python/ovs/automake.mk | |
| parent | 614c4892032f424efa5f0ec404b2d499acad254d (diff) | |
| download | openvswitch-b43c6fe279a5630dfbc0273e06bd1e8ca530ba35.tar.gz | |
Make installation directories overridable at runtime.
This makes it possible to run tests that need access to installation
directories, such as the rundir, without having access to the actual
installation directories (/var/run is generally not world-writable), by
setting environment variables. This is not a good way to do things in
general--usually it would be better to choose the correct directories
at configure time--so for now this is undocumented.
Diffstat (limited to 'python/ovs/automake.mk')
| -rw-r--r-- | python/ovs/automake.mk | 10 |
1 files changed, 6 insertions, 4 deletions
diff --git a/python/ovs/automake.mk b/python/ovs/automake.mk index 5c10c2a91..4a1e7c16f 100644 --- a/python/ovs/automake.mk +++ b/python/ovs/automake.mk @@ -27,10 +27,12 @@ if HAVE_PYTHON nobase_pkgdata_DATA = $(ovs_pyfiles) ovs-install-data-local: $(MKDIR_P) python/ovs - (echo 'PKGDATADIR = """$(pkgdatadir)"""' && \ - echo 'RUNDIR = """@RUNDIR@"""' && \ - echo 'LOGDIR = """@LOGDIR@"""' && \ - echo 'BINDIR = """$(bindir)"""') > python/ovs/dirs.py.tmp + (echo "import os" && \ + echo 'PKGDATADIR = os.environ.get("OVS_PKGDATADIR", """$(pkgdatadir)""")' && \ + echo 'RUNDIR = os.environ.get("OVS_RUNDIR", """@RUNDIR@""")' && \ + echo 'LOGDIR = os.environ.get("OVS_LOGDIR", """@LOGDIR@""")' && \ + echo 'BINDIR = os.environ.get("OVS_BINDIR", """$(bindir)""")') \ + > python/ovs/dirs.py.tmp $(MKDIR_P) $(DESTDIR)$(pkgdatadir)/python/ovs $(INSTALL_DATA) python/ovs/dirs.py.tmp $(DESTDIR)$(pkgdatadir)/python/ovs/dirs.py rm python/ovs/dirs.py.tmp |
