Commit 22c13354 authored by Emil Velikov's avatar Emil Velikov

automake: create compat symlinks only for linux systems

The primary users of these are linux developers, although
it can be extended for *BSD and others if needed.

Fixes make install for Cygwin and OpenBSD at least.

v2:
 - Wrap vdpau targets as well.
v3:
 - Fold HAVE_COMPAT_SYMLINKS conditional within install*links.mk

Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=63269Signed-off-by: Emil Velikov's avatarEmil Velikov <emil.l.velikov@gmail.com>
Reviewed-by: Jon TURNEY <jon.turney@dronecode.org.uk> (v1)
Reviewed-by: Christian König's avatarChristian König <christian.koenig@amd.com>
parent bba9c282
...@@ -316,6 +316,18 @@ if test "x$enable_debug" = xyes; then ...@@ -316,6 +316,18 @@ if test "x$enable_debug" = xyes; then
fi fi
fi fi
dnl
dnl compatibility symlinks
dnl
case "$host_os" in
linux* )
HAVE_COMPAT_SYMLINKS=yes ;;
* )
HAVE_COMPAT_SYMLINKS=no ;;
esac
AM_CONDITIONAL(HAVE_COMPAT_SYMLINKS, test "x$HAVE_COMPAT_SYMLINKS" = xyes)
dnl dnl
dnl library names dnl library names
dnl dnl
......
# Provide compatibility with scripts for the old Mesa build system for # Provide compatibility with scripts for the old Mesa build system for
# a while by putting a link to the driver into /lib of the build tree. # a while by putting a link to the driver into /lib of the build tree.
if HAVE_COMPAT_SYMLINKS
all-local : .libs/install-gallium-links all-local : .libs/install-gallium-links
.libs/install-gallium-links : $(dri_LTLIBRARIES) $(vdpau_LTLIBRARIES) $(egl_LTLIBRARIES) $(lib_LTLIBRARIES) .libs/install-gallium-links : $(dri_LTLIBRARIES) $(vdpau_LTLIBRARIES) $(egl_LTLIBRARIES) $(lib_LTLIBRARIES)
...@@ -21,3 +22,4 @@ all-local : .libs/install-gallium-links ...@@ -21,3 +22,4 @@ all-local : .libs/install-gallium-links
ln -f $$f $$link_dir; \ ln -f $$f $$link_dir; \
fi; \ fi; \
done && touch $@ done && touch $@
endif
# Provide compatibility with scripts for the old Mesa build system for # Provide compatibility with scripts for the old Mesa build system for
# a while by putting a link to the driver into /lib of the build tree. # a while by putting a link to the driver into /lib of the build tree.
if HAVE_COMPAT_SYMLINKS
all-local : .libs/install-mesa-links all-local : .libs/install-mesa-links
.libs/install-mesa-links : $(lib_LTLIBRARIES) .libs/install-mesa-links : $(lib_LTLIBRARIES)
...@@ -12,3 +13,4 @@ all-local : .libs/install-mesa-links ...@@ -12,3 +13,4 @@ all-local : .libs/install-mesa-links
ln -f $$f $(top_builddir)/$(LIB_DIR); \ ln -f $$f $(top_builddir)/$(LIB_DIR); \
fi; \ fi; \
done && touch $@ done && touch $@
endif
...@@ -65,6 +65,7 @@ mesa_dri_drivers_la_LIBADD = \ ...@@ -65,6 +65,7 @@ mesa_dri_drivers_la_LIBADD = \
if NEED_MEGADRIVER if NEED_MEGADRIVER
dri_LTLIBRARIES = mesa_dri_drivers.la dri_LTLIBRARIES = mesa_dri_drivers.la
if HAVE_COMPAT_SYMLINKS
# Add a link to allow setting LD_LIBRARY_PATH/LIBGL_DRIVERS_PATH to /lib of the build tree. # Add a link to allow setting LD_LIBRARY_PATH/LIBGL_DRIVERS_PATH to /lib of the build tree.
all-local: mesa_dri_drivers.la all-local: mesa_dri_drivers.la
$(AM_V_at)$(MKDIR_P) $(top_builddir)/$(LIB_DIR); $(AM_V_at)$(MKDIR_P) $(top_builddir)/$(LIB_DIR);
...@@ -74,6 +75,7 @@ all-local: mesa_dri_drivers.la ...@@ -74,6 +75,7 @@ all-local: mesa_dri_drivers.la
ln -f $(top_builddir)/$(LIB_DIR)/mesa_dri_drivers.@LIB_EXT@ \ ln -f $(top_builddir)/$(LIB_DIR)/mesa_dri_drivers.@LIB_EXT@ \
$(top_builddir)/$(LIB_DIR)/$$i; \ $(top_builddir)/$(LIB_DIR)/$$i; \
done; done;
endif
# hardlink each megadriver instance, but don't actually have # hardlink each megadriver instance, but don't actually have
# mesa_dri_drivers.@LIB_EXT@ in the set of final installed files. # mesa_dri_drivers.@LIB_EXT@ in the set of final installed files.
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment