[Mesa-dev] [PATCH] automake: create compat symlinks only for linux systems

Christian König deathsimple at vodafone.de
Mon Mar 10 01:46:34 PDT 2014


Am 09.03.2014 12:55, schrieb Emil Velikov:
> 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 checks within install*links.mk
>
> Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=63269
> Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
> Reviewed-by: Jon TURNEY <jon.turney at dronecode.org.uk>

Reviewed-by: Christian König <christian.koenig at amd.com>

>
> Signed-off-by: Emil Velikov <emil.l.velikov at gmail.com>
> ---
>
> Interesting the first time tried it I've got some unusual
> results, while it's works nicely now. I'm assuming that
> there was a silly typo somewhere.
>
> Thanks for the reminder Christian, I was not too keen on
> the previous approach either :)
>
> -Emil
>
>   configure.ac                     | 12 ++++++++++++
>   install-gallium-links.mk         |  2 ++
>   install-lib-links.mk             |  2 ++
>   src/mesa/drivers/dri/Makefile.am |  2 ++
>   4 files changed, 18 insertions(+)
>
> diff --git a/configure.ac b/configure.ac
> index 7fbf2cf..c5042f9 100644
> --- a/configure.ac
> +++ b/configure.ac
> @@ -314,6 +314,18 @@ if test "x$enable_debug" = xyes; then
>   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 library names
>   dnl
>   case "$host_os" in
> diff --git a/install-gallium-links.mk b/install-gallium-links.mk
> index be69326..e655608 100644
> --- a/install-gallium-links.mk
> +++ b/install-gallium-links.mk
> @@ -1,6 +1,7 @@
>   # 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.
>   
> +if HAVE_COMPAT_SYMLINKS
>   all-local : .libs/install-gallium-links
>   
>   .libs/install-gallium-links : $(dri_LTLIBRARIES) $(vdpau_LTLIBRARIES) $(egl_LTLIBRARIES) $(lib_LTLIBRARIES)
> @@ -21,3 +22,4 @@ all-local : .libs/install-gallium-links
>   			ln -f $$f $$link_dir;			\
>   		fi;						\
>   	done && touch $@
> +endif
> diff --git a/install-lib-links.mk b/install-lib-links.mk
> index 2707eb8..0e13719 100644
> --- a/install-lib-links.mk
> +++ b/install-lib-links.mk
> @@ -1,6 +1,7 @@
>   # 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.
>   
> +if HAVE_COMPAT_SYMLINKS
>   all-local : .libs/install-mesa-links
>   
>   .libs/install-mesa-links : $(lib_LTLIBRARIES)
> @@ -12,3 +13,4 @@ all-local : .libs/install-mesa-links
>   			ln -f $$f $(top_builddir)/$(LIB_DIR);	\
>   		fi;						\
>   	done && touch $@
> +endif
> diff --git a/src/mesa/drivers/dri/Makefile.am b/src/mesa/drivers/dri/Makefile.am
> index 187e478..17ac76b 100644
> --- a/src/mesa/drivers/dri/Makefile.am
> +++ b/src/mesa/drivers/dri/Makefile.am
> @@ -65,6 +65,7 @@ mesa_dri_drivers_la_LIBADD = \
>   if NEED_MEGADRIVER
>   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.
>   all-local: mesa_dri_drivers.la
>   	$(AM_V_at)$(MKDIR_P) $(top_builddir)/$(LIB_DIR);
> @@ -74,6 +75,7 @@ all-local: mesa_dri_drivers.la
>   		ln -f $(top_builddir)/$(LIB_DIR)/mesa_dri_drivers. at LIB_EXT@ \
>   		      $(top_builddir)/$(LIB_DIR)/$$i; \
>   	done;
> +endif
>   
>   # hardlink each megadriver instance, but don't actually have
>   # mesa_dri_drivers. at LIB_EXT@ in the set of final installed files.



More information about the mesa-dev mailing list