253a365f4d933e0a54ecfe163033bed4da28a0f0
[claws.git] / Makefile.am
1 # Makefile.am for toplevel directory
2 # This file is part of Claws Mail package.
3 # See COPYING file for license details.
4
5 ACLOCAL_AMFLAGS = -I m4
6 AUTOMAKE_OPTIONS = dist-bzip2 dist-xz
7
8 SUBDIRS = m4 po src tools config doc manual
9
10 # when changing the name or location of the .desktop file,
11 # also update src/common/Makefile.am
12 desktop_in_files = claws-mail.desktop.in
13 desktopdir = $(datadir)/applications
14 desktop_DATA = $(desktop_in_files:.desktop.in=.desktop)
15
16 @INTLTOOL_DESKTOP_RULE@
17
18 appdata_in_files = claws-mail.appdata.xml.in
19 appdatadir=$(datadir)/appdata
20 appdata_DATA = $(appdata_in_files:.xml.in=.xml)
21
22 @INTLTOOL_XML_RULE@
23
24 EXTRA_DIST = \
25         ChangeLog \
26         ChangeLog.gtk1 \
27         ChangeLog.pre2.0.0 \
28         ChangeLog.2.0.0-3.0.0 \
29         ChangeLog.3.0.0-3.9.0 \
30         RELEASE_NOTES \
31         claws-mail-128x128.png \
32         claws-mail-64x64.png \
33         claws-mail.pc.in \
34         $(desktop_in_files) \
35         claws-mail.png \
36         $(appdata_DATA) \
37         autogen.sh \
38         claws-features.h.in \
39         version
40
41 # hicolor icon theme, base class of all icon themes
42 pixmapdir=$(datadir)/icons/hicolor/48x48/apps
43 pixmap_DATA=claws-mail.png
44
45 pixmap64dir=$(datadir)/icons/hicolor/64x64/apps
46 pixmap64_DATA=claws-mail-64x64.png
47
48 pixmap128dir=$(datadir)/icons/hicolor/128x128/apps
49 pixmap128_DATA=claws-mail-128x128.png
50
51 rename-icons:
52         @cd $(DESTDIR)$(datadir)/icons/hicolor/64x64/apps && \
53             mv claws-mail-64x64.png claws-mail.png
54         @cd $(DESTDIR)$(datadir)/icons/hicolor/128x128/apps && \
55             mv claws-mail-128x128.png claws-mail.png
56
57 remove-icons:
58         rm -f $(DESTDIR)$(datadir)/icons/hicolor/64x64/apps/claws-mail.png
59         rm -f $(DESTDIR)$(datadir)/icons/hicolor/128x128/apps/claws-mail.png
60
61 if UPDATE_GTK_ICON_CACHE
62 gtk_update_icon_cache = gtk-update-icon-cache -f -t $(datadir)/icons/hicolor
63
64 install-data-hook: rename-icons update-icon-cache
65 uninstall-hook: remove-icons update-icon-cache
66
67 update-icon-cache:
68         @-if test -z "$(DESTDIR)"; then                                 \
69                 echo "Updating Gtk icon cache.";                        \
70                 $(gtk_update_icon_cache);                               \
71         else                                                            \
72                 echo "*** Icon cache not updated. Remember to run:";    \
73                 echo "***";                                             \
74                 echo "***   $(gtk_update_icon_cache)";                  \
75                 echo "***";                                             \
76         fi
77 else
78
79 install-data-hook: rename-icons
80 uninstall-hook: remove-icons
81
82 endif
83
84 pkgconfigdir = $(libdir)/pkgconfig
85 pkgconfig_DATA = claws-mail.pc
86
87 clawsincludedir = $(pkgincludedir)
88 clawsinclude_HEADERS = \
89         claws-features.h
90
91 relnotesdir = $(docdir)
92 relnotes_DATA = RELEASE_NOTES
93
94 dist-local: ChangeLog
95
96 maintainer-clean-local:
97         @rm -f ChangeLog
98         @rm -f version
99
100 ChangeLog: version
101         @./tools/gitlog2changelog.py 3.9.0 > ChangeLog