From 6809889f9fbfbdef7af5f05eaa6be3301b36204e Mon Sep 17 00:00:00 2001 From: Tomas Bzatek Date: Mon, 26 Oct 2009 10:52:29 +0100 Subject: Update icon cache only when installing to default location This will ease packaging, no need to create iconcache on a temporary location. --- Makefile | 16 ++++++++++++---- 1 file changed, 12 insertions(+), 4 deletions(-) diff --git a/Makefile b/Makefile index 3fe085a..d476025 100644 --- a/Makefile +++ b/Makefile @@ -19,7 +19,7 @@ # Specify paths -DESTDIR=/usr +DEFAULT_DESTDIR=/usr # following paths are optional; needed only for Kylix compilation KYLIXPREFIX=/usr/local/kylix3 @@ -29,6 +29,7 @@ GTK2FORPASCAL_LIBDIR=./gtk2 +DESTDIR=$(DEFAULT_DESTDIR) INSTALL=install CLEAN_OBJS=*.o *.a *.d *.s *.ppu *.dcu *.rst *~ *.~* core tuxcmd fpcver.inc LIB_SUFFIX=`if test \`uname -m\` = x86_64; then echo 64; fi` @@ -85,7 +86,9 @@ clean cleandir: ( cd libgtk_kylix && rm -f $(CLEAN_OBJS) ) ( cd translations && rm -f $(CLEAN_OBJS) ) ( cd compat && rm -f $(CLEAN_OBJS) ) - + + +gtk_update_icon_cache = gtk-update-icon-cache -f -t $(DESTDIR)/share/icons/hicolor tuxcmd_install: $(INSTALL) -d $(DESTDIR)/bin @@ -112,8 +115,13 @@ tuxcmd_install: $(INSTALL) -d $(DESTDIR)/share/icons/hicolor/scalable/apps $(INSTALL) -m 644 data/icons/scalable/tuxcmd.svg $(DESTDIR)/share/icons/hicolor/scalable/apps - echo "Updating Gtk icon cache."; - gtk-update-icon-cache -f -t $(DESTDIR)/share/icons/hicolor + @-if test "$(DESTDIR)" = "$(DEFAULT_DESTDIR)"; then \ + echo "Updating Gtk icon cache."; \ + $(gtk_update_icon_cache); \ + else \ + echo "*** Icon cache not updated. After install, run this:"; \ + echo "*** $(gtk_update_icon_cache)"; \ + fi uninstall: -- cgit v1.2.3