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