1 # Makefile for fetchmail
4 AUTOMAKE_OPTIONS= foreign no-dist-gzip dist-bzip2
7 AM_CPPFLAGS= @CPFLAGS@ -I$(srcdir)/libesmtp
9 ACLOCAL_AMFLAGS= -I m4 -I m4-local
11 BUILT_SOURCES= rcfile_y.h
13 bin_PROGRAMS= fetchmail
15 dist_noinst_SCRIPTS= specgen.sh
16 dist_man1_MANS= fetchmail.man
19 pym= fetchmailconf.man
22 nodist_bin_SCRIPTS= fetchmailconf
24 dist_man1_MANS+= $(pym)
31 CLEANFILES= $(nodist_bin_SCRIPTS)
33 # for gettext (used by fetchmail.c, NOT by GNU gettext)
34 localedir= $(datadir)/locale
35 DEFS= @DEFS@ -DLOCALEDIR=\"$(localedir)\"
37 noinst_LIBRARIES= libfm.a
38 libfm_a_SOURCES= xmalloc.c base64.c rfc822.c report.c rfc2047e.c \
39 servport.c ntlm.h smbbyteorder.h smbdes.h smbmd4.h \
40 smbencrypt.h smbdes.c smbencrypt.c smbmd4.c smbutil.c \
41 libesmtp/gethostbyname.h libesmtp/gethostbyname.c
42 libfm_a_LIBADD= $(EXTRAOBJ)
43 libfm_a_DEPENDENCIES= $(EXTRAOBJ)
44 LDADD = libfm.a @LIBINTL@ $(LIBOBJS)
45 DEPENDENCIES= libfm.a $(LIBOBJS)
50 TESTS_ENVIRONMENT= srcdir="@srcdir@" LC_ALL=C TZ=UTC
53 noinst_LIBRARIES+= libtrio.a
54 libtrio_a_SOURCES= trio/triostr.c trio/trio.c trio/trionan.c \
55 trio/trio.h trio/triop.h trio/triodef.h \
56 trio/trionan.h trio/triostr.h
57 check_PROGRAMS+= regression
58 regression_SOURCES= trio/regression.c
59 LDADD += libtrio.a -lm
63 fetchmail_SOURCES= fetchmail.h getopt.h \
64 i18n.h kerberos.h md5.h mx.h netrc.h smtp.h \
66 socket.c getpass.c pop2.c pop3.c imap.c etrn.c \
67 odmr.c fetchmail.c env.c idle.c options.c daemon.c \
68 driver.c transact.c sink.c smtp.c \
69 uid.c mxget.c md5ify.c cram.c kerberos.c gssapi.c \
70 opie.c rpa.c interface.c netrc.c \
71 unmime.c conf.c checkalias.c lock.c \
72 rcfile_l.l rcfile_y.y ucs/norm_charmap.c \
73 libesmtp/getaddrinfo.h libesmtp/getaddrinfo.c \
76 check_PROGRAMS += rfc822 unmime netrc rfc2047e mxget
78 rfc2047e_CFLAGS= -DTEST
82 unmime_SOURCES= unmime.c
83 unmime_CFLAGS= -DSTANDALONE -DHAVE_CONFIG_H -I$(builddir)
85 netrc_SOURCES= netrc.c xmalloc.c report.c
86 netrc_CFLAGS= -DSTANDALONE -DHAVE_CONFIG_H -I$(builddir)
88 mxget_SOURCES= mxget.c
89 mxget_CFLAGS= -DSTANDALONE -DHAVE_CONFIG_H -I$(builddir)
91 # For some losing Unix makes.
95 fetchmail.spec: Makefile.in specgen.sh
96 $(srcdir)/specgen.sh $(VERSION) >fetchmail.spec
98 DISTDOCS= FAQ FEATURES NOTES OLDNEWS fetchmail-man.html \
99 design-notes.html esrs-design-notes.html todo.html \
100 fetchmail-features.html README.SSL README.NTLM \
102 fetchmail-FAQ.book fetchmail-FAQ.pdf fetchmail-FAQ.html \
103 fetchmail-SA-2005-01.txt \
104 fetchmail-SA-2005-02.txt \
105 fetchmail-SA-2005-03.txt
107 # extra directories to ship
108 distdirs = rh-config contrib beos
110 EXTRA_DIST+= $(DISTDOCS) fetchmail.spec $(distdirs) ucs/README.svn \
111 trio/CHANGES trio/README \
112 strlcpy.3 bighand.png \
113 m4-local/ac-archive-license.txt \
114 m4-local/ac_ma_search_package.m4 \
115 m4-local/autobuild.m4 \
117 dist-tools/html2txt \
118 dist-tools/manServer.pl
121 ( echo '#! /bin/sh' && echo 'exec @PYTHON@ @pythondir@/fetchmailconf.py "$$@"' ) >$@ || { rm -f $@ ; exit 1; }
123 FAQ: fetchmail-FAQ.html $(srcdir)/dist-tools/html2txt
124 AWK=$(AWK) $(SHELL) $(srcdir)/dist-tools/html2txt $(srcdir)/fetchmail-FAQ.html >$@ || { rm -f $@ ; exit 1 ; }
126 fetchmail-FAQ.pdf: fetchmail-FAQ.html fetchmail-FAQ.book bighand.png
127 $(AWK) '/^[ \t]*<h1/ {sec++; } {if (sec < 2 || sec > 3) print $0;}' <$(srcdir)/fetchmail-FAQ.html >fetchmail-FAQ-print.html
128 htmldoc --logoimage $(srcdir)/bighand.png --batch $(srcdir)/fetchmail-FAQ.book
129 rm -f fetchmail-FAQ-print.html
131 FEATURES: fetchmail-features.html $(srcdir)/dist-tools/html2txt
132 AWK=$(AWK) $(SHELL) $(srcdir)/dist-tools/html2txt $(srcdir)/fetchmail-features.html >$@ || { rm -f $@ ; exit 1 ; }
134 NOTES: design-notes.html esrs-design-notes.html $(srcdir)/dist-tools/html2txt
135 echo "This file contains two articles reformatted from HTML." > $@ \
136 && echo "------------------------------------------------------" >> $@ \
138 && AWK=$(AWK) $(SHELL) $(srcdir)/dist-tools/html2txt $(srcdir)/design-notes.html >>$@ \
139 && AWK=$(AWK) $(SHELL) $(srcdir)/dist-tools/html2txt $(srcdir)/esrs-design-notes.html >>$@ \
140 || { rm -f $@ ; exit 1 ; }
142 TODO: todo.html $(srcdir)/dist-tools/html2txt
143 AWK=$(AWK) $(SHELL) $(srcdir)/dist-tools/html2txt $(srcdir)/todo.html >$@ || { rm -f $@ ; exit 1 ; }
145 fetchmail-man.html: fetchmail.man $(srcdir)/dist-tools/manServer.pl
146 env - PATH=$$PATH $(srcdir)/dist-tools/manServer.pl $(srcdir)/fetchmail.man >$@ \
147 || { rm -f $@ ; exit 1 ; }
150 cd $(distdir) && find $(distdirs) po -name .svn -type d -prune -exec rm -rf '{}' ';'
151 cd $(distdir) && find $(distdirs) po -name '*~' -exec rm -f '{}' ';'
155 $(SHELL) genlsm.sh >$(PACKAGE)-$(VERSION).lsm
157 # The following sets edit modes for GNU EMACS.
159 # compile-command:"configure"