2011-04-30 [colin] 3.7.9cvs18
[claws.git] / Makefile.am
index d317e28a41439cec3504430e8eedad1e04103b7c..043f6d5ab70ef4e41245f4d79de6fc520cc8730e 100644 (file)
@@ -1,13 +1,7 @@
 ACLOCAL_AMFLAGS = -I m4
 AUTOMAKE_OPTIONS = dist-bzip2
 
-if PLATFORM_WIN32
-tools = 
-else
-tools = tools
-endif
-
-SUBDIRS = m4 po src $(tools) config doc manual
+SUBDIRS = m4 po src tools config doc manual
 
 EXTRA_DIST = \
        ChangeLog \
@@ -25,13 +19,35 @@ EXTRA_DIST = \
 # hicolor icon theme, base class of all icon themes
 pixmapdir=$(datadir)/icons/hicolor/48x48/apps
 pixmap_DATA=claws-mail.png
+
+pixmap64dir=$(datadir)/icons/hicolor/64x64/apps
+pixmap64_DATA=claws-mail-64x64.png
+
+pixmap128dir=$(datadir)/icons/hicolor/128x128/apps
+pixmap128_DATA=claws-mail-128x128.png
+
+# when changing the name or location of the .desktop file,
+# also update src/common/Makefile.am
 gnomapdir = $(datadir)/applications
 gnomap_DATA=claws-mail.desktop
 
+rename-icons:
+       @cd $(DESTDIR)$(datadir)/icons/hicolor/64x64/apps && \
+            mv claws-mail-64x64.png claws-mail.png
+       @cd $(DESTDIR)$(datadir)/icons/hicolor/128x128/apps && \
+            mv claws-mail-128x128.png claws-mail.png
+
+remove-icons:
+       rm -f $(DESTDIR)$(datadir)/icons/hicolor/64x64/apps/claws-mail.png
+       rm -f $(DESTDIR)$(datadir)/icons/hicolor/128x128/apps/claws-mail.png
+
 if CLAWS_GNOME2
 gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
 
-install-data-hook:
+install-data-hook: rename-icons update-icon-cache
+uninstall-hook: remove-icons update-icon-cache
+
+update-icon-cache:
        @-if test -z "$(DESTDIR)"; then                                 \
                 echo "Updating Gtk icon cache.";                       \
                 $(gtk_update_icon_cache);                              \
@@ -41,6 +57,11 @@ install-data-hook:
                 echo "***   $(gtk_update_icon_cache)";                 \
                echo "***";                                             \
         fi
+else
+
+install-data-hook: rename-icons
+uninstall-hook: remove-icons
+
 endif
 
 pkgconfigdir = $(libdir)/pkgconfig