]> granicus.if.org Git - mutt/blob - Makefile.am
Convert pgp_app_handler to use buffer pool.
[mutt] / Makefile.am
1 ## Process this file with automake to produce Makefile.in
2 ## Use aclocal -I m4; automake --foreign
3 include $(top_srcdir)/flymake.am
4
5 AUTOMAKE_OPTIONS = 1.6 foreign
6 EXTRA_PROGRAMS = mutt_dotlock mutt_pgpring pgpewrap mutt_md5
7
8 if BUILD_IMAP
9 IMAP_SUBDIR = imap
10 IMAP_INCLUDES = -I$(top_srcdir)/imap
11 endif
12
13 if BUILD_AUTOCRYPT
14 AUTOCRYPT_SUBDIR = autocrypt
15 AUTOCRYPT_INCLUDES = -I$(top_srcdir)/autocrypt
16 endif
17
18 SUBDIRS = m4 po intl doc contrib $(IMAP_SUBDIR) $(AUTOCRYPT_SUBDIR)
19
20 bin_SCRIPTS = muttbug flea $(SMIMEAUX_TARGET)
21
22 if BUILD_HCACHE
23 HCVERSION = hcversion.h
24 endif
25
26 BUILT_SOURCES = keymap_defs.h patchlist.c reldate.h conststrings.c version.h $(HCVERSION)
27
28 bin_PROGRAMS = mutt $(DOTLOCK_TARGET) $(PGPAUX_TARGET)
29 mutt_SOURCES = \
30         addrbook.c alias.c attach.c base64.c browser.c buffer.c buffy.c color.c \
31         crypt.c cryptglue.c \
32         commands.c complete.c compose.c copy.c curs_lib.c curs_main.c date.c \
33         edit.c enter.c flags.c init.c filter.c from.c \
34         getdomain.c group.c \
35         handler.c hash.c hdrline.c headers.c help.c hook.c keymap.c \
36         main.c mbox.c menu.c mh.c mx.c pager.c parse.c pattern.c \
37         postpone.c query.c recvattach.c recvcmd.c \
38         rfc822.c rfc1524.c rfc2047.c rfc2231.c rfc3676.c \
39         score.c send.c sendlib.c signal.c sort.c \
40         status.c system.c thread.c charset.c history.c lib.c \
41         muttlib.c editmsg.c mbyte.c \
42         url.c ascii.c crypt-mod.c crypt-mod.h safe_asprintf.c
43
44 nodist_mutt_SOURCES = $(BUILT_SOURCES)
45
46 mutt_LDADD = $(MUTT_LIB_OBJECTS) $(LIBOBJS) \
47         $(LIBIMAP) $(LIBAUTOCRYPT) \
48         $(MUTTLIBS) \
49         $(INTLLIBS) $(LIBICONV)  $(GPGME_LIBS) $(GPG_ERROR_LIBS)
50
51 mutt_DEPENDENCIES = $(MUTT_LIB_OBJECTS) $(LIBOBJS) $(LIBIMAPDEPS) \
52         $(INTLDEPS) $(LIBAUTOCRYPTDEPS)
53
54 DEFS=-DPKGDATADIR=\"$(pkgdatadir)\" -DSYSCONFDIR=\"$(sysconfdir)\" \
55         -DBINDIR=\"$(bindir)\" -DMUTTLOCALEDIR=\"$(datadir)/locale\" \
56         -DHAVE_CONFIG_H=1
57
58 AM_CPPFLAGS=-I. -I$(top_srcdir) $(IMAP_INCLUDES) $(AUTOCRYPT_INCLUDES) $(GPGME_CFLAGS) -Iintl
59
60 EXTRA_mutt_SOURCES = account.c bcache.c compress.c crypt-gpgme.c crypt-mod-pgp-classic.c \
61         crypt-mod-pgp-gpgme.c crypt-mod-smime-classic.c \
62         crypt-mod-smime-gpgme.c dotlock.c gnupgparse.c hcache.c md5.c monitor.c \
63         mutt_idna.c mutt_sasl.c mutt_socket.c mutt_ssl.c mutt_ssl_gnutls.c \
64         mutt_tunnel.c pgp.c pgpinvoke.c pgpkey.c pgplib.c pgpmicalg.c \
65         pgppacket.c pop.c pop_auth.c pop_lib.c remailer.c resize.c sha1.c \
66         sidebar.c smime.c smtp.c utf8.c wcwidth.c \
67         bcache.h browser.h hcache.h mbyte.h monitor.h mutt_idna.h remailer.h url.h
68
69 EXTRA_DIST = COPYRIGHT GPL OPS OPS.PGP OPS.CRYPT OPS.SMIME TODO UPDATING \
70         configure account.h \
71         attach.h buffer.h buffy.h charset.h compress.h copy.h crypthash.h \
72         dotlock.h functions.h gen_defs \
73         globals.h hash.h history.h init.h keymap.h mutt_crypt.h \
74         mailbox.h mapping.h md5.h mime.h mutt.h mutt_curses.h mutt_menu.h \
75         mutt_regex.h mutt_sasl.h mutt_socket.h mutt_ssl.h mutt_tunnel.h \
76         mx.h pager.h pgp.h pop.h protos.h rfc1524.h rfc2047.h \
77         rfc2231.h rfc822.h rfc3676.h sha1.h sort.h mime.types VERSION prepare \
78         _mutt_regex.h OPS.MIX README.SECURITY remailer.c remailer.h browser.h \
79         mbyte.h lib.h extlib.c pgpewrap.c smime_keys.pl pgplib.h \
80         README.SSL smime.h group.h \
81         muttbug pgppacket.h depcomp ascii.h BEWARE PATCHES patchlist.sh \
82         ChangeLog mkchangelog.sh mkreldate.sh mutt_idna.h sidebar.h OPS.SIDEBAR \
83         snprintf.c regex.c crypt-gpgme.h hcachever.sh.in \
84         txt2c.c txt2c.sh version.sh check_sec.sh
85
86 EXTRA_SCRIPTS = smime_keys
87
88 mutt_dotlock_SOURCES = mutt_dotlock.c
89 mutt_dotlock_LDADD = $(LIBOBJS)
90 mutt_dotlock_DEPENDENCIES = $(LIBOBJS)
91
92 mutt_pgpring_SOURCES = pgppubring.c pgplib.c lib.c extlib.c sha1.c md5.c pgppacket.c ascii.c
93 mutt_pgpring_LDADD = $(LIBOBJS) $(INTLLIBS)
94 mutt_pgpring_DEPENDENCIES = $(LIBOBJS) $(INTLDEPS)
95
96 mutt_md5_SOURCES = md5.c
97 mutt_md5_CFLAGS = -DMD5UTIL
98 mutt_md5_LDADD =
99
100 txt2c_SOURCES = txt2c.c
101 txt2c_LDADD =
102
103 noinst_PROGRAMS = $(MUTT_MD5) txt2c
104
105 mutt_dotlock.c: dotlock.c
106         cp $(srcdir)/dotlock.c mutt_dotlock.c
107
108 conststrings.c: txt2c config.status
109         ( \
110                 ($(CC) -v >/dev/null 2>&1 && $(CC) -v) || \
111                 ($(CC) --version >/dev/null 2>&1 && $(CC) --version) || \
112                 ($(CC) -V >/dev/null 2>&1 && $(CC) -V) || \
113                 echo "unknown compiler"; \
114         ) 2>&1 | ${srcdir}/txt2c.sh cc_version >conststrings_c
115         echo "$(CFLAGS)" | ${srcdir}/txt2c.sh cc_cflags >>conststrings_c
116         grep ac_cs_config= config.status | \
117         cut -d= -f2- | \
118         sed -e 's/^"//' -e 's/"$$//' | ${srcdir}/txt2c.sh configure_options >>conststrings_c
119         mv -f conststrings_c conststrings.c
120
121 CLEANFILES = mutt_dotlock.c keymap_alldefs.h $(BUILT_SOURCES)
122
123 DISTCLEANFILES= flea smime_keys txt2c po/$(PACKAGE).pot
124
125 ACLOCAL_AMFLAGS = -I m4
126
127 LDADD = $(LIBOBJS) $(INTLLIBS)
128
129 flea: $(srcdir)/muttbug
130         cp $(srcdir)/muttbug flea
131         chmod +x flea
132
133 smime_keys: $(srcdir)/smime_keys.pl
134         cp $(srcdir)/smime_keys.pl smime_keys
135         chmod +x smime_keys
136
137 keymap_defs.h: $(OPS) $(srcdir)/gen_defs
138         $(srcdir)/gen_defs $(OPS) > keymap_defs.h
139
140 keymap_alldefs.h: $(srcdir)/OPS $(srcdir)/OPS.SIDEBAR $(srcdir)/OPS.PGP $(srcdir)/OPS.MIX $(srcdir)/OPS.CRYPT $(srcdir)/OPS.SMIME $(srcdir)/gen_defs
141         rm -f $@
142         $(srcdir)/gen_defs $(srcdir)/OPS $(srcdir)/OPS.SIDEBAR $(srcdir)/OPS.PGP \
143                 $(srcdir)/OPS.MIX $(srcdir)/OPS.CRYPT $(srcdir)/OPS.SMIME \
144                         > keymap_alldefs.h
145
146 # If we have GNU make, we can use the FORCE target to enable
147 # automatic rebuilding of version.h after a commit.
148 if GNU_MAKE
149 version.h: FORCE
150         echo '#define MUTT_VERSION "'`sh "$(srcdir)/version.sh"`'"' > $@.tmp
151         cmp -s $@ $@.tmp && rm -f $@.tmp || mv $@.tmp $@
152 FORCE:
153 # On some other versions of make, such as OpenBSD, invoking the
154 # version.h target always retriggers targets with that prerequisite, which
155 # causes installation issues.
156 else
157 version.h: $(srcdir)/version.sh
158         echo '#define MUTT_VERSION "'`sh "$(srcdir)/version.sh"`'"' > version.h
159 endif
160
161 reldate.h: $(srcdir)/mkreldate.sh $(srcdir)/ChangeLog
162         echo 'const char *ReleaseDate = "'`(cd $(srcdir) && ./mkreldate.sh)`'";' > reldate.h
163
164 # The '#undef ENABLE_NLS' is to work around an automake ordering issue:
165 # BUILT_SOURCES are processed before SUBDIRS.
166 # If configured with --with-included-gettext this means that intl will
167 # not have generated libintl.h yet, and mutt.h -> lib.h will generate
168 # an error.
169 hcversion.h: $(srcdir)/mutt.h $(srcdir)/rfc822.h hcachever.sh $(MUTT_MD5)
170         ( echo '#include "config.h"'; echo '#undef ENABLE_NLS'; echo '#include "mutt.h"'; ) \
171         | $(CPP) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) - | sh ./hcachever.sh hcversion.h
172
173 patchlist.c: $(srcdir)/PATCHES $(srcdir)/patchlist.sh
174         $(srcdir)/patchlist.sh < $(srcdir)/PATCHES > patchlist.c
175
176 install-exec-hook:
177         if test -f $(DESTDIR)$(bindir)/mutt.dotlock && test -f $(DESTDIR)$(bindir)/mutt_dotlock ; then  \
178                 rm -f $(DESTDIR)$(bindir)/mutt.dotlock ;                \
179                 ln -sf $(DESTDIR)$(bindir)/mutt_dotlock $(DESTDIR)$(bindir)/mutt.dotlock ; \
180         fi
181         if test -f $(DESTDIR)$(bindir)/mutt_dotlock && test x$(DOTLOCK_GROUP) != x ; then \
182                 chgrp $(DOTLOCK_GROUP) $(DESTDIR)$(bindir)/mutt_dotlock && \
183                 chmod $(DOTLOCK_PERMISSION) $(DESTDIR)$(bindir)/mutt_dotlock || \
184                 { echo "Can't fix mutt_dotlock's permissions!  This is required to lock mailboxes in the mail spool directory." >&2 ; exit 1 ; } \
185         fi
186
187 install-data-local:
188         $(MKDIR_P) $(DESTDIR)$(sysconfdir)
189         $(INSTALL) -m 644 $(srcdir)/mime.types $(DESTDIR)$(sysconfdir)/mime.types.dist
190         -if [ ! -f $(DESTDIR)$(sysconfdir)/mime.types ]; then \
191                 $(INSTALL) -m 644 $(srcdir)/mime.types $(DESTDIR)$(sysconfdir); \
192         fi
193
194 uninstall-local:
195         for i in mime.types ; do \
196                 if cmp -s $(DESTDIR)$(sysconfdir)/$$i.dist $(DESTDIR)$(sysconfdir)/$$i ; then \
197                         rm $(DESTDIR)$(sysconfdir)/$$i ; \
198                 fi ; \
199                 rm $(DESTDIR)$(sysconfdir)/$${i}.dist ; \
200         done
201
202 pclean:
203         cat /dev/null > $(top_srcdir)/PATCHES
204
205 check-security:
206         (cd $(top_srcdir) && ./check_sec.sh)
207
208 update-changelog:
209         (cd $(top_srcdir); \
210         sh ./mkchangelog.sh | cat  - ChangeLog > ChangeLog.$$$$ && mv ChangeLog.$$$$ ChangeLog; \
211         $${VISUAL:-vi} ChangeLog)
212
213 mutt-dist:
214         (cd $(srcdir) && ./build-release )
215
216 update-doc:
217         (cd doc && $(MAKE) update-doc)
218
219 .PHONY: commit pclean check-security