]> Pileus Git - ~andy/fetchmail/blobdiff - Makefile.am
Add a few revisions (not yet workable).
[~andy/fetchmail] / Makefile.am
index 58892b41f6fffab21783e90674b6f0c6d8cde888..474ecc44ff65ec7de8a4332d212711882f33c359 100644 (file)
@@ -1,25 +1,44 @@
 # Makefile for fetchmail
 
-SUBDIRS=               intl m4 m4-local po
+SUBDIRS=               m4 po
+AUTOMAKE_OPTIONS=      foreign no-dist-gzip dist-bzip2
 
 AM_CFLAGS=             @CEFLAGS@
-AM_CPPFLAGS=           @CPFLAGS@ -I$(top_srcdir)/intl -I$(top_builddir)/intl
+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
 libfm_a_LIBADD=                $(EXTRAOBJ)
 libfm_a_DEPENDENCIES=  $(EXTRAOBJ)
 LDADD  =               libfm.a @LIBINTL@ $(LIBOBJS)
@@ -27,6 +46,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 +57,23 @@ 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 \
                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 \
-               rcfile_l.l rcfile_y.y ucs/norm_charmap.c
+               unmime.c conf.c checkalias.c lock.c \
+               rcfile_l.l rcfile_y.y ucs/norm_charmap.c \
+               libesmtp/getaddrinfo.h libesmtp/getaddrinfo.c \
+               KAME/getnameinfo.c
 
-check_PROGRAMS +=      rfc822 unmime netrc rfc2047e
+check_PROGRAMS +=      rfc822 unmime netrc rfc2047e mxget
 
 rfc2047e_CFLAGS=       -DTEST
 
@@ -63,6 +85,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,15 +95,26 @@ SHELL = /bin/sh
 fetchmail.spec: Makefile.in specgen.sh
        $(srcdir)/specgen.sh $(VERSION) >fetchmail.spec
 
-DISTDOCS=      FAQ FEATURES NOTES OLDNEWS fetchmail-man.html \
+DISTDOCS=      BUGS FAQ FEATURES NOTES OLDNEWS fetchmail-man.html \
                fetchmail-FAQ.html design-notes.html esrs-design-notes.html todo.html \
-               fetchmail-features.html README.SSL README.NTLM
+               fetchmail-features.html README.SSL README.NTLM \
+               README.packaging \
+               fetchmail-SA-2005-01.txt \
+               fetchmail-SA-2005-02.txt
 
 # extra directories to ship
 distdirs = rh-config contrib beos
 
-EXTRA_DIST= $(DISTDOCS) fetchmail.spec $(distdirs) ucs/README.svn \
-           trio/CHANGES trio/README
+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 \
+               m4-local/autobuild.m4 \
+               t.smoke t.rc
+
+fetchmailconf:
+       ( echo '#! /bin/sh' && echo 'exec @PYTHON@ @pythondir@/fetchmailconf.py "$$@"' ) >$@ || { rm -f $@ ; exit 1; }
 
 FAQ: fetchmail-FAQ.html
        AWK=$(AWK) $(SHELL) $(srcdir)/dist-tools/html2txt $(srcdir)/fetchmail-FAQ.html >$@ || { rm -f $@ ; exit 1 ; }
@@ -90,7 +126,7 @@ NOTES: design-notes.html esrs-design-notes.html
           echo "This file contains two articles reformatted from HTML." > $@ \
        && echo "------------------------------------------------------" >> $@ \
        && echo "" >> $@ \
-       && AWK=$(AWK) $(SHELL) $(srcdir)/dist-tools/html2txtx $(srcdir)/design-notes.html >>$@ \
+       && AWK=$(AWK) $(SHELL) $(srcdir)/dist-tools/html2txt $(srcdir)/design-notes.html >>$@ \
        && AWK=$(AWK) $(SHELL) $(srcdir)/dist-tools/html2txt $(srcdir)/esrs-design-notes.html >>$@ \
        || { rm -f $@ ; exit 1 ; }
 
@@ -102,8 +138,8 @@ fetchmail-man.html: fetchmail.man
        || { rm -f $@ ; exit 1 ; }
 
 dist-hook:
-       cd $(distdir) && find $(distdirs) intl po -name .svn -type d -prune -exec rm -rf '{}' ';'
-       cd $(distdir) && find $(distdirs) intl po -name '*~' -exec rm -f '{}' ';'
+       cd $(distdir) && find $(distdirs) po -name .svn -type d -prune -exec rm -rf '{}' ';'
+       cd $(distdir) && find $(distdirs) po -name '*~' -exec rm -f '{}' ';'
 
 # The following sets edit modes for GNU EMACS.
 # Local Variables: