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