Don't update the icon cache if DESTDIR is non-empty.
authorJohn Darrington <john@darrington.wattle.id.au>
Thu, 1 Mar 2012 20:21:44 +0000 (21:21 +0100)
committerJohn Darrington <john@darrington.wattle.id.au>
Thu, 1 Mar 2012 20:21:44 +0000 (21:21 +0100)
Packagers generally use "make install DESTDIR=xxx" to generate their install
files, which are then copied in place to the target filesystem.  In such a
scenario, it's inappropriate to copy the icon.cache files.  This change
therefore does not update the icon cache if a DESTDIR has been specified.
Instead it's left to the packager to make his own arrangements for updating
the icon cache on the target filesystem.

src/ui/gui/automake.mk

index 8de1f910361175c03da27818a5c1cae92aa630a5..cd2696fba55894453e139d65ebaed9191afaff95 100644 (file)
@@ -96,7 +96,9 @@ install-icons:
          $(MKDIR_P) $(themedir)/$$size/apps ; \
          $(INSTALL_DATA) $(top_srcdir)/src/ui/gui/app-icons/$$size/pspp.png $(themedir)/$$size/apps ; \
        done 
-       gtk-update-icon-cache --ignore-theme-index $(themedir)
+       if test -z "$(DESTDIR)" ; then \
+               gtk-update-icon-cache --ignore-theme-index $(themedir); \
+       fi
 
 INSTALL_DATA_HOOKS += install-icons install-lang