]> Pileus Git - ~andy/fetchmail/blobdiff - Makefile.am
Shuffle 0*.html files from ML archive into contrib/ directory.
[~andy/fetchmail] / Makefile.am
index f960dc72cfe7836136cb66065df8429379545cb0..82fb7d7ae2735931401440f7ff7a7f6d81ef0629 100644 (file)
@@ -1,25 +1,45 @@
 # Makefile for fetchmail
 
 SUBDIRS=               m4 po
+AUTOMAKE_OPTIONS=      1.8 foreign no-dist-gzip dist-bzip2
 
 AM_CFLAGS=             @CEFLAGS@
-AM_CPPFLAGS=           @CPFLAGS@
+AM_CPPFLAGS=           @CPFLAGS@ -I$(srcdir)/libesmtp
 AM_LDFLAGS=            @LDEFLAGS@
 ACLOCAL_AMFLAGS=       -I m4 -I m4-local
 AM_YFLAGS=             -d
 BUILT_SOURCES=         rcfile_y.h
 
 bin_PROGRAMS=          fetchmail
-dist_bin_SCRIPTS=      fetchmailconf
+
 dist_noinst_SCRIPTS=   specgen.sh
-dist_man1_MANS=                fetchmail.man fetchmailconf.man
+dist_man1_MANS=                fetchmail.man
+
+pys=                   fetchmailconf.py
+pym=                   fetchmailconf.man
+
+if HAVE_PYTHON
+nodist_bin_SCRIPTS=    fetchmailconf
+python_PYTHON=         $(pys)
+dist_man1_MANS+=       $(pym)
+EXTRA_DIST=
+else
+noinst_PYTHON=         $(pys)
+EXTRA_DIST=            $(pym)
+endif
+
+CLEANFILES=            $(nodist_bin_SCRIPTS)
 
 # for gettext (used by fetchmail.c, NOT by GNU gettext)
 localedir=             $(datadir)/locale
 DEFS=                  @DEFS@ -DLOCALEDIR=\"$(localedir)\"
 
 noinst_LIBRARIES=      libfm.a
-libfm_a_SOURCES=       xmalloc.c base64.c rfc822.c report.c rfc2047e.c
+libfm_a_SOURCES=       xmalloc.c base64.c rfc822.c report.c rfc2047e.c \
+                       servport.c ntlm.h smbbyteorder.h smbdes.h smbmd4.h \
+                       smbencrypt.h smbdes.c smbencrypt.c smbmd4.c smbutil.c \
+                       libesmtp/gethostbyname.h libesmtp/gethostbyname.c \
+                       smbtypes.h fm_getaddrinfo.c tls.c
 libfm_a_LIBADD=                $(EXTRAOBJ)
 libfm_a_DEPENDENCIES=  $(EXTRAOBJ)
 LDADD  =               libfm.a @LIBINTL@ $(LIBOBJS)
@@ -27,6 +47,9 @@ DEPENDENCIES=         libfm.a $(LIBOBJS)
 
 check_PROGRAMS=
 
+TESTS=                 t.smoke
+TESTS_ENVIRONMENT=     srcdir="@srcdir@" LC_ALL=C TZ=UTC
+
 if NEED_TRIO
 noinst_LIBRARIES+=     libtrio.a
 libtrio_a_SOURCES=     trio/triostr.c trio/trio.c trio/trionan.c \
@@ -35,23 +58,49 @@ libtrio_a_SOURCES=  trio/triostr.c trio/trio.c trio/trionan.c \
 check_PROGRAMS+=       regression
 regression_SOURCES=    trio/regression.c
 LDADD +=               libtrio.a -lm
-TESTS=                 regression
+TESTS+=                        regression
 endif
 
 fetchmail_SOURCES=     fetchmail.h getopt.h \
-               i18n.h kerberos.h md5.h mx.h netrc.h ntlm.h \
-               smbbyteorder.h smbdes.h smbmd4.h smbencrypt.h smtp.h \
+               i18n.h kerberos.h md5.h mx.h netrc.h smtp.h \
                socket.h tunable.h \
-               socket.c getpass.c pop2.c pop3.c imap.c etrn.c \
-               odmr.c fetchmail.c env.c idle.c options.c daemon.c \
+               socket.c getpass.c \
+               fetchmail.c env.c idle.c options.c daemon.c \
                driver.c transact.c sink.c smtp.c \
-               uid.c mxget.c md5ify.c cram.c kerberos.c gssapi.c \
-               opie.c rpa.c interface.c netrc.c \
-               unmime.c conf.c checkalias.c smbdes.c smbencrypt.c \
-               smbmd4.c smbutil.c ipv6-connect.c lock.c \
+               uid.c mxget.c md5ify.c cram.c gssapi.c \
+               opie.c interface.c netrc.c \
+               unmime.c conf.c checkalias.c \
+               lock.h lock.c \
                rcfile_l.l rcfile_y.y ucs/norm_charmap.c
+if POP2_ENABLE
+fetchmail_SOURCES += pop2.c
+endif
+if POP3_ENABLE
+fetchmail_SOURCES += pop3.c
+endif
+if IMAP_ENABLE
+fetchmail_SOURCES += imap.c
+endif
+if ETRN_ENABLE
+fetchmail_SOURCES += etrn.c
+endif
+if ODMR_ENABLE
+fetchmail_SOURCES += odmr.c
+endif
+if KERBEROS_V4_ENABLE
+fetchmail_SOURCES += kerberos.c
+endif
+if RPA_ENABLE
+fetchmail_SOURCES += rpa.c
+endif
+if NEED_GETNAMEINFO
+fetchmail_SOURCES += KAME/getnameinfo.c
+endif
+if NEED_GETADDRINFO
+fetchmail_SOURCES += libesmtp/getaddrinfo.h libesmtp/getaddrinfo.c
+endif
 
-check_PROGRAMS +=      rfc822 unmime netrc rfc2047e
+check_PROGRAMS +=      rfc822 unmime netrc rfc2047e mxget
 
 rfc2047e_CFLAGS=       -DTEST
 
@@ -63,6 +112,9 @@ unmime_CFLAGS=       -DSTANDALONE -DHAVE_CONFIG_H -I$(builddir)
 netrc_SOURCES= netrc.c xmalloc.c report.c
 netrc_CFLAGS=  -DSTANDALONE -DHAVE_CONFIG_H -I$(builddir)
 
+mxget_SOURCES= mxget.c
+mxget_CFLAGS=  -DSTANDALONE -DHAVE_CONFIG_H -I$(builddir)
+
 # For some losing Unix makes.
 SHELL = /bin/sh
 @SET_MAKE@
@@ -70,25 +122,47 @@ SHELL = /bin/sh
 fetchmail.spec: Makefile.in specgen.sh
        $(srcdir)/specgen.sh $(VERSION) >fetchmail.spec
 
-DISTDOCS=      BUGS FAQ FEATURES NOTES OLDNEWS fetchmail-man.html \
-               fetchmail-FAQ.html design-notes.html esrs-design-notes.html todo.html \
+DISTDOCS=      FAQ FEATURES NOTES OLDNEWS fetchmail-man.html \
+               design-notes.html esrs-design-notes.html todo.html \
                fetchmail-features.html README.SSL README.NTLM \
-               fetchmail-SA-2005-01.txt
+               README.packaging \
+               fetchmail-FAQ.book fetchmail-FAQ.pdf fetchmail-FAQ.html \
+               fetchmail-SA-2006-03.txt \
+               fetchmail-SA-2006-02.txt \
+               fetchmail-SA-2006-01.txt \
+               fetchmail-SA-2005-01.txt \
+               fetchmail-SA-2005-02.txt \
+               fetchmail-SA-2005-03.txt
 
 # extra directories to ship
 distdirs = rh-config contrib beos
 
-EXTRA_DIST= $(DISTDOCS) fetchmail.spec $(distdirs) ucs/README.svn \
-           trio/CHANGES trio/README strlcpy.3 \
-           m4-local/ac-archive-license.txt m4-local/ac_ma_search_package.m4
-
-FAQ: fetchmail-FAQ.html
+EXTRA_DIST+=   $(DISTDOCS) fetchmail.spec $(distdirs) ucs/README.svn \
+               trio/CHANGES trio/README \
+               strlcpy.3 bighand.png \
+               m4-local/ac-archive-license.txt \
+               m4-local/ac_ma_search_package.m4 \
+               m4-local/autobuild.m4 \
+               t.smoke t.rc \
+               dist-tools/html2txt \
+               dist-tools/manServer.pl \
+               Doxyfile
+
+fetchmailconf:
+       ( echo '#! /bin/sh' && echo 'exec @PYTHON@ @pythondir@/fetchmailconf.py "$$@"' ) >$@ || { rm -f $@ ; exit 1; }
+
+FAQ: fetchmail-FAQ.html $(srcdir)/dist-tools/html2txt
        AWK=$(AWK) $(SHELL) $(srcdir)/dist-tools/html2txt $(srcdir)/fetchmail-FAQ.html >$@ || { rm -f $@ ; exit 1 ; }
 
-FEATURES: fetchmail-features.html
+fetchmail-FAQ.pdf: fetchmail-FAQ.html fetchmail-FAQ.book bighand.png
+       $(AWK) '/^[ \t]*<h1/ {sec++; } {if (sec < 2 || sec > 3) print $0;}' <$(srcdir)/fetchmail-FAQ.html >fetchmail-FAQ-print.html
+       htmldoc --logoimage $(srcdir)/bighand.png --batch $(srcdir)/fetchmail-FAQ.book
+       rm -f fetchmail-FAQ-print.html
+
+FEATURES: fetchmail-features.html $(srcdir)/dist-tools/html2txt
        AWK=$(AWK) $(SHELL) $(srcdir)/dist-tools/html2txt $(srcdir)/fetchmail-features.html >$@ || { rm -f $@ ; exit 1 ; }
 
-NOTES: design-notes.html esrs-design-notes.html
+NOTES: design-notes.html esrs-design-notes.html $(srcdir)/dist-tools/html2txt
           echo "This file contains two articles reformatted from HTML." > $@ \
        && echo "------------------------------------------------------" >> $@ \
        && echo "" >> $@ \
@@ -96,10 +170,10 @@ NOTES: design-notes.html esrs-design-notes.html
        && AWK=$(AWK) $(SHELL) $(srcdir)/dist-tools/html2txt $(srcdir)/esrs-design-notes.html >>$@ \
        || { rm -f $@ ; exit 1 ; }
 
-TODO: todo.html
+TODO: todo.html $(srcdir)/dist-tools/html2txt
        AWK=$(AWK) $(SHELL) $(srcdir)/dist-tools/html2txt $(srcdir)/todo.html >$@ || { rm -f $@ ; exit 1 ; }
 
-fetchmail-man.html: fetchmail.man
+fetchmail-man.html: fetchmail.man $(srcdir)/dist-tools/manServer.pl
        env - PATH=$$PATH $(srcdir)/dist-tools/manServer.pl $(srcdir)/fetchmail.man >$@ \
        || { rm -f $@ ; exit 1 ; }
 
@@ -107,6 +181,17 @@ dist-hook:
        cd $(distdir) && find $(distdirs) po -name .svn -type d -prune -exec rm -rf '{}' ';'
        cd $(distdir) && find $(distdirs) po -name '*~' -exec rm -f '{}' ';'
 
+.PHONY: lsm
+lsm: genlsm.sh dist
+       $(SHELL) genlsm.sh >$(PACKAGE)-$(VERSION).lsm
+
+# this target expects a .rsyncs file with lines of this format:
+# host:directory/
+# it will call rsync from its source directory to the destination for
+# each of them, running them in parallel
+rsync:  distdir $(srcdir)/.rsyncs
+       @( cat $(srcdir)/.rsyncs | sed -e 's}^}rsync -aH --delete-after $(PACKAGE)-$(VERSION)/ }; s/\($$\)/ \&/;' ; echo "wait" ) | $(SHELL) -x
+
 # The following sets edit modes for GNU EMACS.
 # Local Variables:
 # compile-command:"configure"