[evolution/gnome-3-8] Fix icon cache updating when building concurrently.



commit f696cf5b428c56dc1fb9feafbf41940bfc5b2c9f
Author: Matthew Barnes <mbarnes redhat com>
Date:   Sun Aug 11 08:30:19 2013 -0400

    Fix icon cache updating when building concurrently.
    
    When using "make -j [N > 1]", the install-icons/uninstall-icons and
    update-icon-cache make targets were running concurrently.  Move the
    icon cache updating to data/Makefile.am to ensure it runs AFTER the
    icons are installed or uninstalled.

 data/Makefile.am       |   15 +++++++++++++++
 data/icons/Makefile.am |   16 ++--------------
 2 files changed, 17 insertions(+), 14 deletions(-)
---
diff --git a/data/Makefile.am b/data/Makefile.am
index de1a3d0..1bc90ca 100644
--- a/data/Makefile.am
+++ b/data/Makefile.am
@@ -44,6 +44,21 @@ dist_theme_DATA =    \
 
 dist_noinst_MANS = evolution.1
 
+gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
+
+# Keep the icon cache updating here to ensure the image files
+# under the 'icons' SUBDIR are installed or uninstalled first.
+update-icon-cache:
+       @-if test -z "$(DESTDIR)"; then \
+               echo "Updating Gtk icon cache."; \
+               $(gtk_update_icon_cache) \
+       else \
+               echo "*** Icon cache not updated.  After (un)install, run this:"; \
+               echo "***   $(gtk_update_icon_cache)"; \
+       fi
+
+install-data-hook: update-icon-cache
+uninstall-hook: update-icon-cache
 
 CLEANFILES =                                   \
        $(autostart_DATA)                       \
diff --git a/data/icons/Makefile.am b/data/icons/Makefile.am
index 45c03aa..ec9b0aa 100644
--- a/data/icons/Makefile.am
+++ b/data/icons/Makefile.am
@@ -241,17 +241,6 @@ EXTRA_DIST = \
 
 ###############################################################################
 
-gtk_update_icon_cache = gtk-update-icon-cache -f -t
-
-update-icon-cache:
-       @-if test -z "$(DESTDIR)"; then \
-               echo "Updating Gtk icon cache."; \
-               $(gtk_update_icon_cache) $(datadir)/icons/hicolor; \
-       else \
-               echo "*** Icon cache not updated.  After (un)install, run this:"; \
-               echo "***   $(gtk_update_icon_cache) $(datadir)/icons/hicolor"; \
-       fi
-
 install-icons:
        for icon in $(public_icons); do \
                THEME=`echo $$icon | cut -d_ -f1`; \
@@ -301,8 +290,7 @@ uninstall-icons:
                rm -f 
$(DESTDIR)$(pkgdatadir)/$(BASE_VERSION)/icons/$$THEME/$$SIZE/$$CONTEXT/stock_$$ICONFILE; \
        done
 
-install-data-local: install-icons update-icon-cache
-
-uninstall-local: uninstall-icons update-icon-cache
+install-data-local: install-icons
+uninstall-local: uninstall-icons
 
 -include $(top_srcdir)/git.mk


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]