[PATCH 1/2] Don't run gtk-update-icon-cache if DESTDIR is set

roland.dreier at gmail.com roland.dreier at gmail.com
Mon Oct 31 16:05:55 EDT 2011


From: Roland Dreier <roland at purestorage.com>

We don't want to run gtk-update-icon-cache during a package build, when
we're installing into a staging directory just to create a tree that will
be packaged up and really installed later.  The standard heuristic seems
to be to skip gtk-update-icon-cache if DESTDIR is set (ie we're installing
to a different location than we're configured to run from).

Signed-off-by: Roland Dreier <roland at digitalvampire.org>
---
 Makefile |    4 +++-
 1 files changed, 3 insertions(+), 1 deletions(-)

diff --git a/Makefile b/Makefile
index 0d736e1..3f563a3 100644
--- a/Makefile
+++ b/Makefile
@@ -90,7 +90,9 @@ install: $(NAME)
 	$(INSTALL) $(DESKTOPFILE) $(DESKTOPDIR)
 	$(INSTALL) -d -m 755 $(ICONDIR)
 	$(INSTALL) $(ICONFILE) $(ICONDIR)
-	$(gtk_update_icon_cache)
+	@-if test -z "$(DESTDIR)"; then \
+		$(gtk_update_icon_cache); \
+	fi
 	$(INSTALL) -d -m 755 $(MANDIR)
 	$(INSTALL) -m 644 $(MANFILES) $(MANDIR)
 
-- 
1.7.5.4



More information about the subsurface mailing list