diff options
| author | Tomas Bzatek <tbzatek@redhat.com> | 2009-10-26 10:52:29 +0100 |
|---|---|---|
| committer | Tomas Bzatek <tbzatek@redhat.com> | 2009-10-26 10:52:29 +0100 |
| commit | 6809889f9fbfbdef7af5f05eaa6be3301b36204e (patch) | |
| tree | 52dc03240967ab8feea5ba3278c8693fcf10ec29 | |
| parent | 448f54bc4c0c07b607b22efc96238f9f9f1c26d1 (diff) | |
| download | tuxcmd-6809889f9fbfbdef7af5f05eaa6be3301b36204e.tar.xz | |
Update icon cache only when installing to default location
This will ease packaging, no need to create iconcache on a temporary location.
| -rw-r--r-- | Makefile | 16 |
1 files changed, 12 insertions, 4 deletions
@@ -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: |
