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