[Mesa-dev] [PATCHv2 14/20] automake: create compat symlinks only for linux systems

Emil Velikov emil.l.velikov at gmail.com
Sat Mar 8 12:33:02 PST 2014


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.

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>
---
 configure.ac                                   | 12 ++++++++++++
 src/egl/main/Makefile.am                       |  2 ++
 src/egl/wayland/wayland-egl/Makefile.am        |  2 ++
 src/gallium/targets/dri-freedreno/Makefile.am  |  2 ++
 src/gallium/targets/dri-i915/Makefile.am       |  2 ++
 src/gallium/targets/dri-ilo/Makefile.am        |  2 ++
 src/gallium/targets/dri-nouveau/Makefile.am    |  2 ++
 src/gallium/targets/dri-swrast/Makefile.am     |  2 ++
 src/gallium/targets/dri-vmwgfx/Makefile.am     |  2 ++
 src/gallium/targets/egl-static/Makefile.am     |  2 ++
 src/gallium/targets/libgl-xlib/Makefile.am     |  2 ++
 src/gallium/targets/opencl/Makefile.am         |  2 ++
 src/gallium/targets/osmesa/Makefile.am         |  2 ++
 src/gallium/targets/r300/dri/Makefile.am       |  2 ++
 src/gallium/targets/r600/dri/Makefile.am       |  2 ++
 src/gallium/targets/r600/vdpau/Makefile.am     |  2 ++
 src/gallium/targets/radeonsi/dri/Makefile.am   |  2 ++
 src/gallium/targets/radeonsi/vdpau/Makefile.am |  2 ++
 src/gallium/targets/vdpau-nouveau/Makefile.am  |  2 ++
 src/gallium/targets/xa/Makefile.am             |  2 ++
 src/gbm/Makefile.am                            |  2 ++
 src/glx/Makefile.am                            |  2 ++
 src/mapi/es1api/Makefile.am                    |  2 ++
 src/mapi/es2api/Makefile.am                    |  2 ++
 src/mapi/shared-glapi/Makefile.am              |  2 ++
 src/mapi/vgapi/Makefile.am                     |  2 ++
 src/mesa/drivers/osmesa/Makefile.am            |  2 ++
 src/mesa/drivers/x11/Makefile.am               |  2 ++
 28 files changed, 66 insertions(+)

diff --git a/configure.ac b/configure.ac
index 5e1d091..620f76e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -317,6 +317,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
 if test "$enable_static" = yes; then
diff --git a/src/egl/main/Makefile.am b/src/egl/main/Makefile.am
index 46e890a..e08a06c 100644
--- a/src/egl/main/Makefile.am
+++ b/src/egl/main/Makefile.am
@@ -109,7 +109,9 @@ libEGL_la_LIBADD += ../drivers/dri2/libegl_dri2.la
 libEGL_la_LIBADD += $(DLOPEN_LIBS) $(LIBDRM_LIBS)
 endif
 
+if HAVE_COMPAT_SYMLINKS
 include $(top_srcdir)/install-lib-links.mk
+endif
 
 pkgconfigdir = $(libdir)/pkgconfig
 
diff --git a/src/egl/wayland/wayland-egl/Makefile.am b/src/egl/wayland/wayland-egl/Makefile.am
index c8d0196..264d7ad 100644
--- a/src/egl/wayland/wayland-egl/Makefile.am
+++ b/src/egl/wayland/wayland-egl/Makefile.am
@@ -12,4 +12,6 @@ libwayland_egl_la_LDFLAGS = -version-info 1
 
 TESTS = wayland-egl-symbols-check
 
+if HAVE_COMPAT_SYMLINKS
 include $(top_srcdir)/install-lib-links.mk
+endif
diff --git a/src/gallium/targets/dri-freedreno/Makefile.am b/src/gallium/targets/dri-freedreno/Makefile.am
index f71fd32..5810e45 100644
--- a/src/gallium/targets/dri-freedreno/Makefile.am
+++ b/src/gallium/targets/dri-freedreno/Makefile.am
@@ -63,4 +63,6 @@ msm_dri_la_SOURCES  = target-msm.c
 msm_dri_la_LDFLAGS  = $(COMMON_LDFLAGS)
 msm_dri_la_LIBADD   = $(COMMON_LIBADD)
 
+if HAVE_COMPAT_SYMLINKS
 include $(top_srcdir)/install-gallium-links.mk
+endif
diff --git a/src/gallium/targets/dri-i915/Makefile.am b/src/gallium/targets/dri-i915/Makefile.am
index bba0886..f2852a6 100644
--- a/src/gallium/targets/dri-i915/Makefile.am
+++ b/src/gallium/targets/dri-i915/Makefile.am
@@ -59,4 +59,6 @@ AM_CPPFLAGS += -DGALLIUM_LLVMPIPE
 i915_dri_la_LIBADD += $(top_builddir)/src/gallium/drivers/llvmpipe/libllvmpipe.la $(LLVM_LIBS)
 endif
 
+if HAVE_COMPAT_SYMLINKS
 include $(top_srcdir)/install-gallium-links.mk
+endif
diff --git a/src/gallium/targets/dri-ilo/Makefile.am b/src/gallium/targets/dri-ilo/Makefile.am
index 18d3c44..10eb7c4 100644
--- a/src/gallium/targets/dri-ilo/Makefile.am
+++ b/src/gallium/targets/dri-ilo/Makefile.am
@@ -59,4 +59,6 @@ ilo_dri_la_LDFLAGS += $(LLVM_LDFLAGS)
 ilo_dri_la_LIBADD += $(LLVM_LIBS)
 endif
 
+if HAVE_COMPAT_SYMLINKS
 include $(top_srcdir)/install-gallium-links.mk
+endif
diff --git a/src/gallium/targets/dri-nouveau/Makefile.am b/src/gallium/targets/dri-nouveau/Makefile.am
index 6a00a66..8c3a6f5 100644
--- a/src/gallium/targets/dri-nouveau/Makefile.am
+++ b/src/gallium/targets/dri-nouveau/Makefile.am
@@ -55,4 +55,6 @@ nouveau_dri_la_LDFLAGS += $(LLVM_LDFLAGS)
 nouveau_dri_la_LIBADD += $(LLVM_LIBS)
 endif
 
+if HAVE_COMPAT_SYMLINKS
 include $(top_srcdir)/install-gallium-links.mk
+endif
diff --git a/src/gallium/targets/dri-swrast/Makefile.am b/src/gallium/targets/dri-swrast/Makefile.am
index e05e99d..a629da6 100644
--- a/src/gallium/targets/dri-swrast/Makefile.am
+++ b/src/gallium/targets/dri-swrast/Makefile.am
@@ -62,4 +62,6 @@ swrast_dri_la_LDFLAGS += $(LLVM_LDFLAGS)
 swrast_dri_la_LIBADD += $(top_builddir)/src/gallium/drivers/llvmpipe/libllvmpipe.la $(LLVM_LIBS)
 endif
 
+if HAVE_COMPAT_SYMLINKS
 include $(top_srcdir)/install-gallium-links.mk
+endif
diff --git a/src/gallium/targets/dri-vmwgfx/Makefile.am b/src/gallium/targets/dri-vmwgfx/Makefile.am
index 85b02da..e6a499b 100644
--- a/src/gallium/targets/dri-vmwgfx/Makefile.am
+++ b/src/gallium/targets/dri-vmwgfx/Makefile.am
@@ -58,4 +58,6 @@ vmwgfx_dri_la_LDFLAGS += $(LLVM_LDFLAGS)
 vmwgfx_dri_la_LIBADD += $(LLVM_LIBS)
 endif
 
+if HAVE_COMPAT_SYMLINKS
 include $(top_srcdir)/install-gallium-links.mk
+endif
diff --git a/src/gallium/targets/egl-static/Makefile.am b/src/gallium/targets/egl-static/Makefile.am
index 282fa66..e7726ab 100644
--- a/src/gallium/targets/egl-static/Makefile.am
+++ b/src/gallium/targets/egl-static/Makefile.am
@@ -242,4 +242,6 @@ endif
 endif
 endif
 
+if HAVE_COMPAT_SYMLINKS
 include $(top_srcdir)/install-gallium-links.mk
+endif
diff --git a/src/gallium/targets/libgl-xlib/Makefile.am b/src/gallium/targets/libgl-xlib/Makefile.am
index 7e84ffe..114d9a4 100644
--- a/src/gallium/targets/libgl-xlib/Makefile.am
+++ b/src/gallium/targets/libgl-xlib/Makefile.am
@@ -72,4 +72,6 @@ libGL_la_LINK = $(CXXLINK) $(libGL_la_LDFLAGS)
 nodist_EXTRA_libGL_la_SOURCES = dummy-c.c
 endif
 
+if HAVE_COMPAT_SYMLINKS
 include $(top_srcdir)/install-gallium-links.mk
+endif
diff --git a/src/gallium/targets/opencl/Makefile.am b/src/gallium/targets/opencl/Makefile.am
index 20a5247..02d628c 100644
--- a/src/gallium/targets/opencl/Makefile.am
+++ b/src/gallium/targets/opencl/Makefile.am
@@ -51,4 +51,6 @@ icddir = /etc/OpenCL/vendors/
 icd_DATA = mesa.icd
 endif
 
+if HAVE_COMPAT_SYMLINKS
 include $(top_srcdir)/install-gallium-links.mk
+endif
diff --git a/src/gallium/targets/osmesa/Makefile.am b/src/gallium/targets/osmesa/Makefile.am
index 66ddf93..c065773 100644
--- a/src/gallium/targets/osmesa/Makefile.am
+++ b/src/gallium/targets/osmesa/Makefile.am
@@ -68,8 +68,10 @@ endif
 
 
 if BUILD_SHARED
+if HAVE_COMPAT_SYMLINKS
 include $(top_srcdir)/install-gallium-links.mk
 endif
+endif
 
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = osmesa.pc
diff --git a/src/gallium/targets/r300/dri/Makefile.am b/src/gallium/targets/r300/dri/Makefile.am
index f4f50c1..d923260 100644
--- a/src/gallium/targets/r300/dri/Makefile.am
+++ b/src/gallium/targets/r300/dri/Makefile.am
@@ -57,4 +57,6 @@ r300_dri_la_LDFLAGS += $(LLVM_LDFLAGS)
 r300_dri_la_LIBADD += $(LLVM_LIBS)
 endif
 
+if HAVE_COMPAT_SYMLINKS
 include $(top_srcdir)/install-gallium-links.mk
+endif
diff --git a/src/gallium/targets/r600/dri/Makefile.am b/src/gallium/targets/r600/dri/Makefile.am
index 2753082..a39734b 100644
--- a/src/gallium/targets/r600/dri/Makefile.am
+++ b/src/gallium/targets/r600/dri/Makefile.am
@@ -59,4 +59,6 @@ r600_dri_la_LDFLAGS += $(LLVM_LDFLAGS)
 r600_dri_la_LIBADD += $(LLVM_LIBS)
 endif
 
+if HAVE_COMPAT_SYMLINKS
 include $(top_srcdir)/install-gallium-links.mk
+endif
diff --git a/src/gallium/targets/r600/vdpau/Makefile.am b/src/gallium/targets/r600/vdpau/Makefile.am
index b760afb..a3e4c0c 100644
--- a/src/gallium/targets/r600/vdpau/Makefile.am
+++ b/src/gallium/targets/r600/vdpau/Makefile.am
@@ -52,4 +52,6 @@ libvdpau_r600_la_LDFLAGS += $(LLVM_LDFLAGS)
 libvdpau_r600_la_LIBADD += $(LLVM_LIBS)
 endif
 
+if HAVE_COMPAT_SYMLINKS
 include $(top_srcdir)/install-gallium-links.mk
+endif
diff --git a/src/gallium/targets/radeonsi/dri/Makefile.am b/src/gallium/targets/radeonsi/dri/Makefile.am
index 4f0b97d..5ab59f4 100644
--- a/src/gallium/targets/radeonsi/dri/Makefile.am
+++ b/src/gallium/targets/radeonsi/dri/Makefile.am
@@ -57,4 +57,6 @@ radeonsi_dri_la_LDFLAGS += $(LLVM_LDFLAGS)
 radeonsi_dri_la_LIBADD += $(LLVM_LIBS)
 endif
 
+if HAVE_COMPAT_SYMLINKS
 include $(top_srcdir)/install-gallium-links.mk
+endif
diff --git a/src/gallium/targets/radeonsi/vdpau/Makefile.am b/src/gallium/targets/radeonsi/vdpau/Makefile.am
index adad4c6..2167278 100644
--- a/src/gallium/targets/radeonsi/vdpau/Makefile.am
+++ b/src/gallium/targets/radeonsi/vdpau/Makefile.am
@@ -49,4 +49,6 @@ libvdpau_radeonsi_la_LDFLAGS += $(LLVM_LDFLAGS)
 libvdpau_radeonsi_la_LIBADD += $(LLVM_LIBS)
 endif
 
+if HAVE_COMPAT_SYMLINKS
 include $(top_srcdir)/install-gallium-links.mk
+endif
diff --git a/src/gallium/targets/vdpau-nouveau/Makefile.am b/src/gallium/targets/vdpau-nouveau/Makefile.am
index 16af16a..e6cd8e5 100644
--- a/src/gallium/targets/vdpau-nouveau/Makefile.am
+++ b/src/gallium/targets/vdpau-nouveau/Makefile.am
@@ -49,4 +49,6 @@ libvdpau_nouveau_la_LDFLAGS += $(LLVM_LDFLAGS)
 libvdpau_nouveau_la_LIBADD += $(LLVM_LIBS)
 endif
 
+if HAVE_COMPAT_SYMLINKS
 include $(top_srcdir)/install-gallium-links.mk
+endif
diff --git a/src/gallium/targets/xa/Makefile.am b/src/gallium/targets/xa/Makefile.am
index 1cdb21b..52dd8db 100644
--- a/src/gallium/targets/xa/Makefile.am
+++ b/src/gallium/targets/xa/Makefile.am
@@ -76,4 +76,6 @@ else
 nodist_EXTRA_libxatracker_la_SOURCES = dummy-c.c
 endif
 
+if HAVE_COMPAT_SYMLINKS
 include $(top_srcdir)/install-lib-links.mk
+endif
diff --git a/src/gbm/Makefile.am b/src/gbm/Makefile.am
index 6abd2a7..ebc47a3 100644
--- a/src/gbm/Makefile.am
+++ b/src/gbm/Makefile.am
@@ -46,4 +46,6 @@ endif
 
 TESTS = gbm-symbols-check
 
+if HAVE_COMPAT_SYMLINKS
 include $(top_srcdir)/install-lib-links.mk
+endif
diff --git a/src/glx/Makefile.am b/src/glx/Makefile.am
index eb20240..964217b 100644
--- a/src/glx/Makefile.am
+++ b/src/glx/Makefile.am
@@ -116,4 +116,6 @@ lib at GL_LIB@_la_SOURCES =
 lib at GL_LIB@_la_LIBADD = $(GL_LIBS)
 lib at GL_LIB@_la_LDFLAGS = $(GL_LDFLAGS)
 
+if HAVE_COMPAT_SYMLINKS
 include $(top_srcdir)/install-lib-links.mk
+endif
diff --git a/src/mapi/es1api/Makefile.am b/src/mapi/es1api/Makefile.am
index b61f9cb..1539577 100644
--- a/src/mapi/es1api/Makefile.am
+++ b/src/mapi/es1api/Makefile.am
@@ -57,4 +57,6 @@ glapi_mapi_tmp.h: ../glapi/gen/gl_and_es_API.xml $(glapi_gen_mapi_deps)
 BUILT_SOURCES = glapi_mapi_tmp.h
 CLEANFILES = $(BUILT_SOURCES)
 
+if HAVE_COMPAT_SYMLINKS
 include $(top_srcdir)/install-lib-links.mk
+endif
diff --git a/src/mapi/es2api/Makefile.am b/src/mapi/es2api/Makefile.am
index a944493..2b24e09 100644
--- a/src/mapi/es2api/Makefile.am
+++ b/src/mapi/es2api/Makefile.am
@@ -61,4 +61,6 @@ glapi_mapi_tmp.h: ../glapi/gen/gl_and_es_API.xml $(glapi_gen_mapi_deps)
 BUILT_SOURCES = glapi_mapi_tmp.h
 CLEANFILES = $(BUILT_SOURCES)
 
+if HAVE_COMPAT_SYMLINKS
 include $(top_srcdir)/install-lib-links.mk
+endif
diff --git a/src/mapi/shared-glapi/Makefile.am b/src/mapi/shared-glapi/Makefile.am
index 8d8b4dd..4116a80 100644
--- a/src/mapi/shared-glapi/Makefile.am
+++ b/src/mapi/shared-glapi/Makefile.am
@@ -28,4 +28,6 @@ AM_CPPFLAGS =							\
 	-DMAPI_MODE_GLAPI					\
 	-DMAPI_ABI_HEADER=\"shared-glapi/glapi_mapi_tmp.h\"
 
+if HAVE_COMPAT_SYMLINKS
 include $(top_srcdir)/install-lib-links.mk
+endif
diff --git a/src/mapi/vgapi/Makefile.am b/src/mapi/vgapi/Makefile.am
index 197f19f..edb773d 100644
--- a/src/mapi/vgapi/Makefile.am
+++ b/src/mapi/vgapi/Makefile.am
@@ -53,4 +53,6 @@ vgapi_tmp.h: $(srcdir)/vgapi.csv $(top_srcdir)/src/mapi/mapi_abi.py
 BUILT_SOURCES = vgapi_tmp.h
 CLEANFILES = $(BUILT_SOURCES)
 
+if HAVE_COMPAT_SYMLINKS
 include $(top_srcdir)/install-lib-links.mk
+endif
diff --git a/src/mesa/drivers/osmesa/Makefile.am b/src/mesa/drivers/osmesa/Makefile.am
index e18b735..9ab6820 100644
--- a/src/mesa/drivers/osmesa/Makefile.am
+++ b/src/mesa/drivers/osmesa/Makefile.am
@@ -48,8 +48,10 @@ lib at OSMESA_LIB@_la_LIBADD = \
 	$(OSMESA_LIB_DEPS)
 
 if BUILD_SHARED
+if HAVE_COMPAT_SYMLINKS
 include $(top_srcdir)/install-lib-links.mk
 endif
+endif
 
 pkgconfigdir = $(libdir)/pkgconfig
 pkgconfig_DATA = osmesa.pc
diff --git a/src/mesa/drivers/x11/Makefile.am b/src/mesa/drivers/x11/Makefile.am
index 3f3a24b..cc83793 100644
--- a/src/mesa/drivers/x11/Makefile.am
+++ b/src/mesa/drivers/x11/Makefile.am
@@ -65,5 +65,7 @@ lib at GL_LIB@_la_LDFLAGS = \
 	$(GL_LIB_DEPS)
 
 if BUILD_SHARED
+if HAVE_COMPAT_SYMLINKS
 include $(top_srcdir)/install-lib-links.mk
 endif
+endif
-- 
1.9.0



More information about the mesa-dev mailing list