From 0ac965cc10094e81db87c2b921c1001e97ee6410 Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Thu, 22 Dec 2016 02:11:36 +0530 Subject: Fix shared library symlink aliasing on install Set the rules for the symlinking on the target itself, and then reuse that information while generating aliases during the build, and then pass it to the install script too. --- mesonbuild/scripts/meson_install.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'mesonbuild/scripts') diff --git a/mesonbuild/scripts/meson_install.py b/mesonbuild/scripts/meson_install.py index 11dd320..c749b4f 100644 --- a/mesonbuild/scripts/meson_install.py +++ b/mesonbuild/scripts/meson_install.py @@ -222,14 +222,14 @@ def install_targets(d): else: raise RuntimeError('Unknown file type for {!r}'.format(fname)) printed_symlink_error = False - for alias in aliases: + for alias, to in aliases.items(): try: symlinkfilename = os.path.join(outdir, alias) try: os.unlink(symlinkfilename) except FileNotFoundError: pass - os.symlink(os.path.split(fname)[-1], symlinkfilename) + os.symlink(to, symlinkfilename) append_to_log(symlinkfilename) except (NotImplementedError, OSError): if not printed_symlink_error: -- cgit v1.1