mirror of
https://gitlab.freedesktop.org/dbus/dbus.git
synced 2026-03-21 18:00:39 +01:00
meson: Allow sudo meson install, which doesn't set DESTDIR
This is generally not recommended (dbus should usually be installed from the OS distributor's packages, which should install into a staging directory using `DESTDIR`), but we'll want to use it in Gitlab-CI. Signed-off-by: Simon McVittie <smcv@collabora.com>
This commit is contained in:
parent
dd5fdcacf7
commit
14c1dcd322
2 changed files with 3 additions and 3 deletions
|
|
@ -9,10 +9,10 @@ import sys
|
|||
from pathlib import Path
|
||||
|
||||
for d in sys.argv[1].split(':'):
|
||||
if os.path.isabs(d) and 'DESTDIR' in os.environ:
|
||||
if os.path.isabs(d):
|
||||
p = Path(d)
|
||||
d = p.relative_to(p.anchor)
|
||||
dest = os.path.join(os.environ['DESTDIR'], d)
|
||||
dest = os.path.join(os.environ.get('DESTDIR', '/'), d)
|
||||
else:
|
||||
dest = os.path.join(os.environ['MESON_INSTALL_DESTDIR_PREFIX'], d)
|
||||
|
||||
|
|
|
|||
|
|
@ -14,7 +14,7 @@ link_name, d, pointing_to = sys.argv[1:]
|
|||
if os.path.isabs(d):
|
||||
p = Path(d)
|
||||
d = p.relative_to(p.anchor)
|
||||
dest = os.path.join(os.environ['DESTDIR'], d)
|
||||
dest = os.path.join(os.environ.get('DESTDIR', '/'), d)
|
||||
else:
|
||||
dest = os.path.join(os.environ['MESON_INSTALL_DESTDIR_PREFIX'], d)
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue