fix regression, propably due to some changes in the string API
[apps/madmutt.git] / Makefile.am
1 ## Process this file with automake to produce Makefile.in
2 ## Use aclocal -I m4; automake --foreign
3
4 AUTOMAKE_OPTIONS = foreign
5 EXTRA_PROGRAMS = muttng_dotlock pgpringng pgpewrapng makedoc
6
7 if BUILD_IMAP
8 IMAP_SUBDIR = imap
9 IMAP_INCLUDES = -I$(top_srcdir)/imap
10 endif
11
12 if BUILD_POP
13 POP_SUBDIR = pop
14 POP_INCLUDES = -I$(top_srcdir)/pop
15 endif
16
17 if BUILD_NNTP
18 NNTP_SUBDIR = nntp
19 NNTP_INCLUDES = -I$(top_srcdir)/nntp
20 endif
21
22 SUBDIRS = intl m4 po lib-lib lib-hash doc contrib lib $(IMAP_SUBDIR) $(POP_SUBDIR) $(NNTP_SUBDIR)
23
24 bin_SCRIPTS = muttngbug fleang
25
26 BUILT_SOURCES = keymap_defs.h version.h
27
28 bin_PROGRAMS = muttng @DOTLOCK_TARGET@ @PGPAUX_TARGET@ @SMIMEAUX_TARGET@
29 muttng_SOURCES = $(BUILT_SOURCES) \
30         alias.c attach.c base64.c browser.c buffy.c \
31         charset.c color.c compress.c crypt.c cryptglue.c commands.c complete.c \
32         compose.c copy.c curs_lib.c curs_main.c crypt-mod.c crypt-mod.h \
33         date.c edit.c editmsg.c enter.c \
34         flags.c filter.c from.c getdomain.c \
35         handler.c hcache.c hdrline.c headers.c help.c history.c hook.c \
36         init.c keymap.c lib.c \
37         main.c mbox.c mbyte.c menu.c mh.c muttlib.c mutt_idna.c mx.c \
38         pager.c parse.c pattern.c postpone.c \
39         query.c \
40         recvattach.c recvcmd.c rfc822.c rfc1524.c rfc2047.c rfc2231.c rfc3676.c \
41         score.c send.c sendlib.c sidebar.c signal.c sort.c state.c status.c system.c \
42         thread.c \
43         url.c utf8.c \
44         wcwidth.c
45
46 muttng_LDADD = @MUTT_LIB_OBJECTS@ @LIBOBJS@ $(LIBIMAP) $(LIBPOP) $(LIBNNTP) \
47         -Llib-lib -llib -Llib-hash -lhash -Llib -lsane $(MUTTLIBS) $(INTLLIBS) $(LIBICONV)
48
49 muttng_DEPENDENCIES = @MUTT_LIB_OBJECTS@ @LIBOBJS@ \
50                       $(top_builddir)/lib-lib/liblib.a \
51                       $(top_builddir)/lib/libsane.a \
52         $(LIBIMAPDEPS) $(LIBPOPDEPS) $(LIBNNTPDEPS) $(INTLDEPS)
53
54 makedoc_SOURCES = makedoc.c
55 makedoc_LDADD =
56 makedoc_DEPENDENCIES = 
57
58 # $(makedoc_OBJECTS): $(makedoc_SOURCES)
59 #       $(HOST_CC) $(DEFS) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) -c $<
60
61 # makedoc: $(makedoc_OBJECTS) $(makedoc_DEPENDENCIES)
62 #       @rm -rf makedoc
63 #       $(HOST_CC) $(AM_CFLAGS) $(LDFLAGS) $(makedoc_LDFLAGS) $(makedoc_OBJECTS) $(makedoc_LDADD) -o makedoc
64
65 CPP=@CPP@
66
67 DEFS=-DPKGDATADIR=\"$(pkgdatadir)\" -DSYSCONFDIR=\"$(sysconfdir)\" \
68         -DBINDIR=\"$(bindir)\" -DMUTTLOCALEDIR=\"$(datadir)/locale\" \
69         -DHAVE_CONFIG_H=1 -DPKGDOCDIR=\"$(docdir)\"
70
71 INCLUDES=-I. -I$(top_srcdir) $(IMAP_INCLUDES) $(POP_INCLUDES) $(NNTP_INCLUDES) $(LIBGPGME_CFLAGS) -Iintl
72
73 CPPFLAGS=@CPPFLAGS@ -I$(includedir)
74
75 EXTRA_muttng_SOURCES = \
76         account.c mutt_sasl.c mutt_socket.c mutt_ssl.c \
77         mutt_tunnel.c smime.c pgp.c pgpinvoke.c pgpkey.c \
78         pgplib.c pgpmicalg.c gnupgparse.c resize.c dotlock.c remailer.c \
79         alias.h browser.h enter.h \
80         mbyte.h remailer.h url.h state.h \
81         pgppacket.c mutt_idna.h mutt_libesmtp.c \
82         crypt-mod-pgp-classic.c crypt-mod-smime-classic.c \
83         sidebar.h state.h
84
85 EXTRA_DIST = config.rpath  COPYRIGHT GPL OPS OPS.PGP OPS.CRYPT OPS.SMIME TODO \
86         configure acconfig.h \
87         account.h alias.h attach.h recvattach.h handler.h thread.h \
88         buffy.h charset.h compress.h copy.h \
89         dotlock.h functions.h gen_defs \
90         enter.h recvattach.h handler.h thread.h \
91         globals.h history.h init.h keymap.h mutt_crypt.h \
92         mapping.h mime.h mutt.h mutt_curses.h mutt_menu.h \
93         mutt_sasl.h mutt_socket.h mutt_ssl.h mutt_tunnel.h \
94         mbox.h mh.h mx.h pager.h pgp.h protos.h reldate.h rfc1524.h rfc2047.h \
95         rfc2231.h rfc822.h rfc3676.h \
96         sort.h mime.types autogen.sh \
97         _regex.h OPS.MIX remailer.c remailer.h browser.h state.h \
98         mbyte.h lib.h extlib.c pgpewrap.c smime_keys.pl pgplib.h Muttngrc.head Muttngrc \
99         makedoc.c stamp-doc-rc README.SSL smime.h\
100         muttngbug pgppacket.h depcomp BEWARE \
101         mkchangelog.sh cvslog2changelog.pl mutt_idna.h \
102         regex.c mutt_libesmtp.h crypt-gpgme.h
103
104 muttng_dotlock_SOURCES = dotlock.c
105 muttng_dotlock_LDADD = @LIBOBJS@
106 muttng_dotlock_DEPENDENCIES = @LIBOBJS@
107
108 pgpringng_SOURCES = pgppubring.c pgplib.c lib.c extlib.c pgppacket.c
109 pgpringng_LDADD = @LIBOBJS@ $(INTLLIBS) -Llib-lib -llib -Llib-hash -lhash -Llib -lsane
110 pgpringng_DEPENDENCIES = @LIBOBJS@ $(INTLDEPS)
111
112 pgpewrapng_SOURCES = pgpewrap.c
113 pgpewrapng_LDADD = 
114 pgpewrapng_DEPENDENCIES = 
115
116 CLEANFILES = stamp-doc-rc makedoc \
117         keymap_alldefs.h keymap_defs.h version.h
118
119 ACLOCAL_AMFLAGS = -I m4
120
121 LDADD = @LIBOBJS@ @LIBINTL@
122
123 OPS=@OPS@
124
125 fleang: muttbug.sh
126         cp muttbug.sh fleang
127         chmod +x fleang
128
129 smime_keysng: $(srcdir)/smime_keys.pl
130         cp $(srcdir)/smime_keys.pl smime_keysng
131         chmod +x smime_keysng
132
133 Makefile: $(BUILT_SOURCES)
134
135 keymap_defs.h: $(OPS) $(srcdir)/gen_defs
136         $(srcdir)/gen_defs $(OPS) > keymap_defs.h
137
138 keymap_alldefs.h: $(srcdir)/OPS $(srcdir)/OPS.PGP $(srcdir)/OPS.MIX $(srcdir)/OPS.CRYPT $(srcdir)/OPS.SMIME $(srcdir)/gen_defs
139         $(srcdir)/gen_defs $(srcdir)/OPS $(srcdir)/OPS.PGP \
140                 $(srcdir)/OPS.MIX $(srcdir)/OPS.CRYPT $(srcdir)/OPS.SMIME \
141                         > keymap_alldefs.h
142
143 version.h: Makefile.am
144         echo "#define MUTT_REVISION \"git\"" > version.h
145
146 reldate:
147         echo 'const char *ReleaseDate = "'`date +%Y-%m-%d`'";' > $(srcdir)/reldate.h
148
149 install-exec-hook:
150         if test -f $(DESTDIR)$(bindir)/mutt.dotlock && test -f $(DESTDIR)$(bindir)/muttng_dotlock ; then        \
151                 rm -f $(DESTDIR)$(bindir)/mutt.dotlock ;                \
152                 ln -sf $(DESTDIR)$(bindir)/muttng_dotlock $(DESTDIR)$(bindir)/mutt.dotlock ; \
153         fi
154         if test -f $(DESTDIR)$(bindir)/muttng_dotlock && test x@DOTLOCK_GROUP@ != x ; then \
155                 chgrp @DOTLOCK_GROUP@ $(DESTDIR)$(bindir)/muttng_dotlock && \
156                 chmod @DOTLOCK_PERMISSION@ $(DESTDIR)$(bindir)/muttng_dotlock || \
157                 { echo "Can't fix muttng_dotlock's permissions!" >&2 ; } \
158         fi
159
160 install-data-local: Muttngrc
161         $(srcdir)/mkinstalldirs $(DESTDIR)$(sysconfdir)
162         -if [ -f $(DESTDIR)$(pkgdatadir)/Muttngrc ] ; then \
163                 mv $(DESTDIR)$(pkgdatadir)/Muttngrc* $(DESTDIR)$(sysconfdir) ; \
164         elif [ -f $(DESTDIR)$(pkgdatadir)/../Muttngrc ] ; then \
165                 mv $(DESTDIR)$(pkgdatadir)/../Muttngrc* $(DESTDIR)$(sysconfdir) ; \
166         elif [ ! -f $(DESTDIR)$(sysconfdir)/Muttngrc ] ; then \
167                 $(INSTALL) -m 644 Muttngrc $(DESTDIR)$(sysconfdir) ; \
168         fi
169         -if [ ! -f $(DESTDIR)$(sysconfdir)/muttng-mime.types ]; then \
170                 $(INSTALL) -m 644 $(srcdir)/mime.types $(DESTDIR)$(sysconfdir)/muttng-mime.types; \
171         fi
172
173
174 # kluge around automake problems.
175
176 dist-hook:
177         -for file in $(BUILT_SOURCES) ; do rm -f $(distdir)/$$file ; done
178
179 mutt-dist:
180         (cd $(srcdir) && ./build-release )
181
182 update-doc: stamp-doc-rc
183         (cd doc && $(MAKE) update-doc)
184
185 Muttngrc: stamp-doc-rc
186
187 stamp-doc-rc: $(srcdir)/init.h makedoc Muttngrc.head
188         -rm -f Muttngrc stamp-doc-rc
189         $(CPP) $(INCLUDES) $(DEFS) $(CPPFLAGS) -D_MAKEDOC -C \
190                 $(srcdir)/init.h | ./makedoc -c | cat Muttngrc.head - > Muttngrc
191         touch stamp-doc-rc
192
193
194 -include cflags.mk