]> Pileus Git - ~andy/fetchmail/blob - Makefile.am
Fix typo.
[~andy/fetchmail] / Makefile.am
1 # Makefile for fetchmail
2
3 SUBDIRS=                m4 po
4 AUTOMAKE_OPTIONS=       foreign no-dist-gzip dist-bzip2
5
6 AM_CFLAGS=              @CEFLAGS@
7 AM_CPPFLAGS=            @CPFLAGS@ -I$(srcdir)/libesmtp
8 AM_LDFLAGS=             @LDEFLAGS@
9 ACLOCAL_AMFLAGS=        -I m4 -I m4-local
10 AM_YFLAGS=              -d
11 BUILT_SOURCES=          rcfile_y.h
12
13 bin_PROGRAMS=           fetchmail
14 nodist_bin_SCRIPTS=     fetchmailconf
15 python_PYTHON=          fetchmailconf.py
16 dist_noinst_SCRIPTS=    specgen.sh
17 dist_man1_MANS=         fetchmail.man fetchmailconf.man
18
19 CLEANFILES=             $(nodist_bin_SCRIPTS)
20
21 # for gettext (used by fetchmail.c, NOT by GNU gettext)
22 localedir=              $(datadir)/locale
23 DEFS=                   @DEFS@ -DLOCALEDIR=\"$(localedir)\"
24
25 noinst_LIBRARIES=       libfm.a
26 libfm_a_SOURCES=        xmalloc.c base64.c rfc822.c report.c rfc2047e.c \
27                         servport.c ntlm.h smbbyteorder.h smbdes.h smbmd4.h \
28                         smbencrypt.h smbdes.c smbencrypt.c smbmd4.c smbutil.c \
29                         libesmtp/gethostbyname.h libesmtp/gethostbyname.c
30 libfm_a_LIBADD=         $(EXTRAOBJ)
31 libfm_a_DEPENDENCIES=   $(EXTRAOBJ)
32 LDADD   =               libfm.a @LIBINTL@ $(LIBOBJS)
33 DEPENDENCIES=           libfm.a $(LIBOBJS)
34
35 check_PROGRAMS=
36
37 if NEED_TRIO
38 noinst_LIBRARIES+=      libtrio.a
39 libtrio_a_SOURCES=      trio/triostr.c trio/trio.c trio/trionan.c \
40                         trio/trio.h trio/triop.h trio/triodef.h \
41                         trio/trionan.h trio/triostr.h
42 check_PROGRAMS+=        regression
43 regression_SOURCES=     trio/regression.c
44 LDADD +=                libtrio.a -lm
45 TESTS=                  regression
46 endif
47
48 fetchmail_SOURCES=      fetchmail.h getopt.h \
49                 i18n.h kerberos.h md5.h mx.h netrc.h smtp.h \
50                 socket.h tunable.h \
51                 socket.c getpass.c pop2.c pop3.c imap.c etrn.c \
52                 odmr.c fetchmail.c env.c idle.c options.c daemon.c \
53                 driver.c transact.c sink.c smtp.c \
54                 uid.c mxget.c md5ify.c cram.c kerberos.c gssapi.c \
55                 opie.c rpa.c interface.c netrc.c \
56                 unmime.c conf.c checkalias.c lock.c \
57                 rcfile_l.l rcfile_y.y ucs/norm_charmap.c \
58                 libesmtp/getaddrinfo.h libesmtp/getaddrinfo.c \
59                 KAME/getnameinfo.c
60
61 check_PROGRAMS +=       rfc822 unmime netrc rfc2047e mxget
62
63 rfc2047e_CFLAGS=        -DTEST
64
65 rfc822_CFLAGS=  -DMAIN
66
67 unmime_SOURCES= unmime.c
68 unmime_CFLAGS=  -DSTANDALONE -DHAVE_CONFIG_H -I$(builddir)
69
70 netrc_SOURCES=  netrc.c xmalloc.c report.c
71 netrc_CFLAGS=   -DSTANDALONE -DHAVE_CONFIG_H -I$(builddir)
72
73 mxget_SOURCES=  mxget.c
74 mxget_CFLAGS=   -DSTANDALONE -DHAVE_CONFIG_H -I$(builddir)
75
76 # For some losing Unix makes.
77 SHELL = /bin/sh
78 @SET_MAKE@
79
80 fetchmail.spec: Makefile.in specgen.sh
81         $(srcdir)/specgen.sh $(VERSION) >fetchmail.spec
82
83 DISTDOCS=       BUGS FAQ FEATURES NOTES OLDNEWS fetchmail-man.html \
84                 fetchmail-FAQ.html design-notes.html esrs-design-notes.html todo.html \
85                 fetchmail-features.html README.SSL README.NTLM \
86                 fetchmail-SA-2005-01.txt
87
88 # extra directories to ship
89 distdirs = rh-config contrib beos
90
91 EXTRA_DIST= $(DISTDOCS) fetchmail.spec $(distdirs) ucs/README.svn \
92             trio/CHANGES trio/README strlcpy.3 \
93             m4-local/ac-archive-license.txt m4-local/ac_ma_search_package.m4
94
95 fetchmailconf:
96         ( echo '#! /bin/sh' && echo 'exec @PYTHON@ @pythondir@/fetchmailconf.py "$$@"' ) >$@ || { rm -f $@ ; exit 1; }
97
98 FAQ: fetchmail-FAQ.html
99         AWK=$(AWK) $(SHELL) $(srcdir)/dist-tools/html2txt $(srcdir)/fetchmail-FAQ.html >$@ || { rm -f $@ ; exit 1 ; }
100
101 FEATURES: fetchmail-features.html
102         AWK=$(AWK) $(SHELL) $(srcdir)/dist-tools/html2txt $(srcdir)/fetchmail-features.html >$@ || { rm -f $@ ; exit 1 ; }
103
104 NOTES: design-notes.html esrs-design-notes.html
105            echo "This file contains two articles reformatted from HTML." > $@ \
106         && echo "------------------------------------------------------" >> $@ \
107         && echo "" >> $@ \
108         && AWK=$(AWK) $(SHELL) $(srcdir)/dist-tools/html2txt $(srcdir)/design-notes.html >>$@ \
109         && AWK=$(AWK) $(SHELL) $(srcdir)/dist-tools/html2txt $(srcdir)/esrs-design-notes.html >>$@ \
110         || { rm -f $@ ; exit 1 ; }
111
112 TODO: todo.html
113         AWK=$(AWK) $(SHELL) $(srcdir)/dist-tools/html2txt $(srcdir)/todo.html >$@ || { rm -f $@ ; exit 1 ; }
114
115 fetchmail-man.html: fetchmail.man
116         env - PATH=$$PATH $(srcdir)/dist-tools/manServer.pl $(srcdir)/fetchmail.man >$@ \
117         || { rm -f $@ ; exit 1 ; }
118
119 dist-hook:
120         cd $(distdir) && find $(distdirs) po -name .svn -type d -prune -exec rm -rf '{}' ';'
121         cd $(distdir) && find $(distdirs) po -name '*~' -exec rm -f '{}' ';'
122
123 # The following sets edit modes for GNU EMACS.
124 # Local Variables:
125 # compile-command:"configure"
126 # End: