summaryrefslogtreecommitdiffstats
path: root/src/gallium/targets/dri/Makefile.am
diff options
context:
space:
mode:
authorEmil Velikov <[email protected]>2017-03-03 19:25:40 +0000
committerEmil Velikov <[email protected]>2017-03-04 15:26:43 +0000
commit1cd4fde053ce5252ae1cb7e74899a9af39544d79 (patch)
treed381e2d9a0c3a9fb10b2c5fce16e479ceacbfa9a /src/gallium/targets/dri/Makefile.am
parent342e5fdb6432e79e5ada2675c3eccf352b167474 (diff)
gallium/targets: don't leave an empty target directory(ies)
Some drivers do not support certain targets - for example nouveau doesn't do VAAPI, while freedreno doesn't do of the video backends. As such if we enter vdpau when building freedreno/ilo/etc, a vdpau/ folder will be created, empty library will be build and almost immediately removed. Thus keeping an empty vdpau/ folder around. There are two ways to fix this. * add substantial tracking in configure/makefiles so that we never end up in targets/vdpau Downsides: Error prone, as the configure checks and the 'include gallium/drivers/foo/Automake.inc' can easily get out of sync. * remove the folder, if empty, alongside the empty library. Downsides: In the latter case vdpau/ might be empty before the mesa build has started, yet we'll remove it either way. This patch implements the latter option, as the downside isn't that significant, plus the patch is way shorter ;-) v2: use has_drivers to track since TARGET_DRIVERS can contain space, hence neither string comparison nor -n/-z works correctly. Gentoo Bugzilla: https://bugs.gentoo.org/545230 Signed-off-by: Emil Velikov <[email protected]> Reviewed-by: Matt Turner <[email protected]>
Diffstat (limited to 'src/gallium/targets/dri/Makefile.am')
-rw-r--r--src/gallium/targets/dri/Makefile.am4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/gallium/targets/dri/Makefile.am b/src/gallium/targets/dri/Makefile.am
index 50c273376f6..4d92f45e421 100644
--- a/src/gallium/targets/dri/Makefile.am
+++ b/src/gallium/targets/dri/Makefile.am
@@ -139,10 +139,12 @@ endif
# gallium_dri.so in the set of final installed files.
install-data-hook:
for i in $(TARGET_DRIVERS); do \
+ has_drivers=1; \
ln -f $(DESTDIR)$(dridir)/gallium_dri.so \
$(DESTDIR)$(dridir)/$${i}_dri.so; \
done; \
- $(RM) $(DESTDIR)$(dridir)/gallium_dri.*
+ $(RM) $(DESTDIR)$(dridir)/gallium_dri.*; \
+ test $${has_drivers} -eq 1 || $(RM) -d $(DESTDIR)$(dridir)
uninstall-hook:
for i in $(TARGET_DRIVERS); do \