]> Pileus Git - ~andy/fetchmail/blob - Makefile.am
Kill Kerberos IV and RPOP.
[~andy/fetchmail] / Makefile.am
1 # Makefile for fetchmail
2
3 SUBDIRS=                . po
4 AUTOMAKE_OPTIONS=       1.8 foreign no-dist-gzip dist-bzip2
5
6 AM_CPPFLAGS=            -I$(srcdir)/libesmtp
7 ACLOCAL_AMFLAGS=        -I m4 -I m4-local
8 AM_YFLAGS=              -d
9 BUILT_SOURCES=          rcfile_y.h
10
11 bin_PROGRAMS=           fetchmail
12
13 dist_noinst_SCRIPTS=    specgen.sh
14 dist_man1_MANS=         fetchmail.man
15
16 pys=                    fetchmailconf.py
17 pym=                    fetchmailconf.man
18
19 if HAVE_PYTHON
20 nodist_bin_SCRIPTS=     fetchmailconf
21 python_PYTHON=          $(pys)
22 dist_man1_MANS+=        $(pym)
23 EXTRA_DIST=
24 else
25 noinst_PYTHON=          $(pys)
26 EXTRA_DIST=             $(pym)
27 endif
28
29 CLEANFILES=             $(nodist_bin_SCRIPTS)
30
31 # for gettext (used by fetchmail.c, NOT by GNU gettext)
32 localedir=              $(datadir)/locale
33 DEFS=                   @DEFS@ -DLOCALEDIR=\"$(localedir)\"
34
35 noinst_LIBRARIES=       libfm.a
36 libfm_a_SOURCES=        xmalloc.c base64.c rfc822.c report.c rfc2047e.c \
37                         servport.c ntlm.h smbbyteorder.h smbdes.h smbmd4.h \
38                         smbencrypt.h smbdes.c smbencrypt.c smbmd4.c smbutil.c \
39                         libesmtp/gethostbyname.h libesmtp/gethostbyname.c \
40                         smbtypes.h fm_getaddrinfo.c tls.c rfc822valid.c \
41                         xmalloc.h sdump.h sdump.c x509_name_match.c \
42                         fm_strl.h
43 if NTLM_ENABLE
44 libfm_a_SOURCES += ntlmsubr.c
45 endif
46 libfm_a_LIBADD=         $(EXTRAOBJ)
47 libfm_a_DEPENDENCIES=   $(EXTRAOBJ)
48 LDADD   =               libfm.a @LIBINTL@ $(LIBOBJS)
49 DEPENDENCIES=           libfm.a $(LIBOBJS)
50
51 check_PROGRAMS=
52
53 TESTS=                  t.smoke t.validate-xhtml t.x509_name_match
54 TESTS_ENVIRONMENT=      srcdir="$(srcdir)" LC_ALL=C TZ=UTC SHELL="$(SHELL)" $(SHELL)
55
56 fetchmail_SOURCES=      fetchmail.h getopt.h \
57                 i18n.h kerberos.h fm_md5.h netrc.h smtp.h \
58                 socket.h tunable.h \
59                 socket.c getpass.c \
60                 fetchmail.c env.c idle.c options.c daemon.c \
61                 driver.c transact.c sink.c smtp.c \
62                 idlist.c uid.c md5ify.c cram.c gssapi.c \
63                 opie.c interface.c netrc.c \
64                 unmime.c conf.c checkalias.c \
65                 lock.h lock.c \
66                 rcfile_l.l rcfile_y.y \
67                 ucs/norm_charmap.c ucs/norm_charmap.h
68 if POP3_ENABLE
69 fetchmail_SOURCES += pop3.c
70 endif
71 if IMAP_ENABLE
72 fetchmail_SOURCES += imap.c
73 endif
74 if ETRN_ENABLE
75 fetchmail_SOURCES += etrn.c
76 endif
77 if ODMR_ENABLE
78 fetchmail_SOURCES += odmr.c
79 endif
80 if RPA_ENABLE
81 fetchmail_SOURCES += rpa.c
82 endif
83 if NEED_GETNAMEINFO
84 fetchmail_SOURCES += KAME/getnameinfo.c
85 endif
86 if NEED_GETADDRINFO
87 fetchmail_SOURCES += libesmtp/getaddrinfo.h libesmtp/getaddrinfo.c
88 endif
89
90 check_PROGRAMS +=       rfc822 unmime netrc rfc2047e rfc822valid \
91                         x509_name_match
92
93 rfc2047e_CFLAGS=        -DTEST
94
95 rfc822valid_CFLAGS=     -DTEST
96
97 rfc822_CFLAGS=          -DMAIN
98
99 x509_name_match_CFLAGS= -DTEST
100
101 unmime_SOURCES= unmime.c
102 unmime_CFLAGS=  -DSTANDALONE -DHAVE_CONFIG_H -I$(builddir)
103
104 netrc_SOURCES=  netrc.c xmalloc.c report.c
105 netrc_CFLAGS=   -DSTANDALONE -DHAVE_CONFIG_H -I$(builddir)
106
107 @SET_MAKE@
108
109 fetchmail.spec: Makefile.in specgen.sh
110         $(srcdir)/specgen.sh $(VERSION) >fetchmail.spec
111
112 DISTDOCS=       FAQ FEATURES NOTES OLDNEWS fetchmail-man.html \
113                 design-notes.html esrs-design-notes.html todo.html \
114                 fetchmail-features.html README.SSL README.NTLM \
115                 README.packaging README.SSL-SERVER \
116                 fetchmail-FAQ.book fetchmail-FAQ.pdf fetchmail-FAQ.html \
117                 Mailbox-Names-UTF7.txt Mailbox-Names-UTF7.html \
118                 fetchmail-EN-2010-03.txt \
119                 fetchmail-SA-2010-02.txt \
120                 fetchmail-SA-2010-01.txt \
121                 fetchmail-SA-2009-01.txt \
122                 fetchmail-SA-2008-01.txt \
123                 fetchmail-SA-2007-02.txt \
124                 fetchmail-SA-2007-01.txt \
125                 fetchmail-SA-2006-03.txt \
126                 fetchmail-SA-2006-02.txt \
127                 fetchmail-SA-2006-01.txt \
128                 fetchmail-SA-2005-01.txt \
129                 fetchmail-SA-2005-02.txt \
130                 fetchmail-SA-2005-03.txt
131
132 # extra directories to ship
133 distdirs = rh-config contrib beos
134
135 EXTRA_DIST+=    $(DISTDOCS) $(distdirs) \
136                 fetchmail.spec fetchmail.xpm \
137                 strlcpy.3 bighand.png \
138                 m4/codeset.m4 \
139                 m4/gettext.m4 \
140                 m4/glibc2.m4 \
141                 m4/glibc21.m4 \
142                 m4/iconv.m4 \
143                 m4/intdiv0.m4 \
144                 m4/intl.m4 \
145                 m4/intldir.m4 \
146                 m4/intlmacosx.m4 \
147                 m4/intmax.m4 \
148                 m4/inttypes-pri.m4 \
149                 m4/inttypes_h.m4 \
150                 m4/lcmessage.m4 \
151                 m4/lib-ld.m4 \
152                 m4/lib-link.m4 \
153                 m4/lib-prefix.m4 \
154                 m4/lock.m4 \
155                 m4/longlong.m4 \
156                 m4/nls.m4 \
157                 m4/po.m4 \
158                 m4/printf-posix.m4 \
159                 m4/progtest.m4 \
160                 m4/size_max.m4 \
161                 m4/stdint_h.m4 \
162                 m4/uintmax_t.m4 \
163                 m4/visibility.m4 \
164                 m4/wchar_t.m4 \
165                 m4/wint_t.m4 \
166                 m4/xsize.m4 \
167                 m4-local/ac-archive-license.txt \
168                 m4-local/ac_ma_search_package.m4 \
169                 $(TESTS) t.rc t.regression \
170                 dist-tools/html2txt \
171                 dist-tools/manServer.pl \
172                 Doxyfile
173
174 fetchmailconf:
175         ( echo '#! /bin/sh' && echo 'exec @PYTHON@ @pythondir@/fetchmailconf.py "$$@"' ) >$@ && chmod +x $@ || { rm -f $@ ; exit 1; }
176
177 FAQ: fetchmail-FAQ.html $(srcdir)/dist-tools/html2txt
178         AWK=$(AWK) $(SHELL) $(srcdir)/dist-tools/html2txt $(srcdir)/fetchmail-FAQ.html >$@ || { rm -f $@ ; exit 1 ; }
179
180 fetchmail-FAQ.pdf: fetchmail-FAQ.html fetchmail-FAQ.book bighand.png
181         $(AWK) '/^[ \t]*<h1/ {sec++; } {if (sec < 2 || sec > 3) print $0;}' <$(srcdir)/fetchmail-FAQ.html >fetchmail-FAQ-print.html
182         htmldoc --logoimage $(srcdir)/bighand.png --batch $(srcdir)/fetchmail-FAQ.book || { rm -f $@ ; exit 1 ; }
183         rm -f fetchmail-FAQ-print.html
184
185 FEATURES: fetchmail-features.html $(srcdir)/dist-tools/html2txt
186         AWK=$(AWK) $(SHELL) $(srcdir)/dist-tools/html2txt $(srcdir)/fetchmail-features.html >$@ || { rm -f $@ ; exit 1 ; }
187
188 NOTES: design-notes.html esrs-design-notes.html $(srcdir)/dist-tools/html2txt
189            echo "This file contains two articles reformatted from HTML." > $@ \
190         && echo "------------------------------------------------------" >> $@ \
191         && echo "" >> $@ \
192         && AWK=$(AWK) $(SHELL) $(srcdir)/dist-tools/html2txt $(srcdir)/design-notes.html >>$@ \
193         && AWK=$(AWK) $(SHELL) $(srcdir)/dist-tools/html2txt $(srcdir)/esrs-design-notes.html >>$@ \
194         || { rm -f $@ ; exit 1 ; }
195
196 TODO: todo.html $(srcdir)/dist-tools/html2txt
197         AWK=$(AWK) $(SHELL) $(srcdir)/dist-tools/html2txt $(srcdir)/todo.html >$@ || { rm -f $@ ; exit 1 ; }
198
199 fetchmail-man.html: fetchmail.man $(srcdir)/dist-tools/manServer.pl
200         env - "PATH=$$PATH" $(srcdir)/dist-tools/manServer.pl $(srcdir)/fetchmail.man >$@ \
201         || { rm -f $@ ; exit 1 ; }
202
203 dist-hook:
204         cd $(distdir) && find $(distdirs) po -name .git -type d -prune -exec rm -rf '{}' ';'
205         cd $(distdir) && find $(distdirs) po -name '*~' -exec rm -f '{}' ';'
206
207 .PHONY: lsm
208 lsm: genlsm.sh dist
209         $(SHELL) genlsm.sh >$(PACKAGE)-$(VERSION).lsm
210
211 # this target expects a .rsyncs file with lines of this format:
212 # host:directory/
213 # it will call rsync from its source directory to the destination for
214 # each of them, running them in parallel
215 rsync:  distdir $(srcdir)/.rsyncs
216         @( cat $(srcdir)/.rsyncs | sed -e 's}^}rsync -aH --delete-after $(PACKAGE)-$(VERSION)/ }; s/\($$\)/ \&/;' ; echo "wait" ) | $(SHELL) -x
217
218 .PHONY: import-translations
219 import-translations:
220         rsync -Lrtvz translationproject.org::tp/latest/fetchmail/  $(top_srcdir)/po
221         cd $(top_builddir)/po && $(MAKE) update-po
222
223 SUFFIXES = .html .txt
224 .txt.html:
225         asciidoc --unsafe -a toc -a data-uri -o $@ $< || { rm -f $@ ; exit 1 ; }
226
227 # The following sets edit modes for GNU EMACS.
228 # Local Variables:
229 # compile-command:"configure"
230 # End: