diff options
Diffstat (limited to 'src/gallium/targets')
-rw-r--r-- | src/gallium/targets/dri/Makefile.am | 4 | ||||
-rw-r--r-- | src/gallium/targets/vdpau/Makefile.am | 4 | ||||
-rw-r--r-- | src/gallium/targets/xvmc/Makefile.am | 4 |
3 files changed, 9 insertions, 3 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 \ diff --git a/src/gallium/targets/vdpau/Makefile.am b/src/gallium/targets/vdpau/Makefile.am index 97c0ab27f51..a0f310bc596 100644 --- a/src/gallium/targets/vdpau/Makefile.am +++ b/src/gallium/targets/vdpau/Makefile.am @@ -108,6 +108,7 @@ endif install-data-hook: $(AM_V_GEN)dest_dir=$(DESTDIR)/$(vdpaudir); \ for i in $(TARGET_DRIVERS); do \ + has_drivers=1; \ j=libvdpau_gallium.$(LIB_EXT); \ k=libvdpau_$${i}.$(LIB_EXT); \ l=$${k}.$(VDPAU_MAJOR).$(VDPAU_MINOR).0; \ @@ -120,7 +121,8 @@ install-data-hook: ln -sf $${l} \ $${dest_dir}/$${k}; \ done; \ - $(RM) $${dest_dir}/libvdpau_gallium.* + $(RM) $${dest_dir}/libvdpau_gallium.*; \ + test $${has_drivers} -eq 1 || $(RM) -d $${dest_dir} uninstall-hook: for i in $(TARGET_DRIVERS); do \ diff --git a/src/gallium/targets/xvmc/Makefile.am b/src/gallium/targets/xvmc/Makefile.am index c8bac58961d..b65a191eab0 100644 --- a/src/gallium/targets/xvmc/Makefile.am +++ b/src/gallium/targets/xvmc/Makefile.am @@ -70,6 +70,7 @@ endif install-data-hook: $(AM_V_GEN)dest_dir=$(DESTDIR)/$(xvmcdir); \ for i in $(TARGET_DRIVERS); do \ + has_drivers=1; \ j=libXvMCgallium.$(LIB_EXT); \ k=libXvMC$${i}.$(LIB_EXT); \ l=$${k}.$(XVMC_MAJOR).$(XVMC_MINOR).0; \ @@ -82,7 +83,8 @@ install-data-hook: ln -sf $${l} \ $${dest_dir}/$${k}; \ done; \ - $(RM) $${dest_dir}/libXvMCgallium.* + $(RM) $${dest_dir}/libXvMCgallium.*; \ + test $${has_drivers} -eq 1 || $(RM) -d $${dest_dir} uninstall-hook: for i in $(TARGET_DRIVERS); do \ |