]> diplodocus.org Git - nmh/blobdiff - Makefile.am
Added context_find_prefix().
[nmh] / Makefile.am
index 7ffcf9b00e9c4275fc732355d32cc32f71b46316..fa681971c51a96cce618b8c748df42a2a48cbbe6 100644 (file)
@@ -7,6 +7,8 @@
 ## We set this to get our autoconf macros in the m4 directory
 ACLOCAL_AMFLAGS = -I m4
 
+AM_YFLAGS = -d
+
 ##
 ## This is the default set of libraries all programs link against.  Some
 ## programs add extra libraries to this set, so they override this with
@@ -37,6 +39,7 @@ TESTS_ENVIRONMENT = MH_OBJ_DIR="@abs_builddir@" \
                    MH_TEST_DIR="@abs_builddir@/test/testdir" \
                    nmhlibexecdir="$(nmhlibexecdir)" bindir="$(bindir)" \
                    mandir="$(mandir)" nmhetcdir="$(nmhetcdir)" \
+                   nmhetcdirinst="@nmhetcdirinst@$(nmhetcdir)" \
                    supported_locks="$(supported_locks)" \
                    default_locking="${default_locking}" \
                    MULTIBYTE_ENABLED=$(MULTIBYTE_ENABLED) \
@@ -71,7 +74,7 @@ TESTS = test/ali/test-ali test/anno/test-anno \
        test/mhbuild/test-ext-params \
        test/mhbuild/test-forw test/mhbuild/test-header-encode \
        test/mhbuild/test-utf8-body \
-       test/mhfixmsg/test-mhfixmsg \
+       test/mhfixmsg/test-mhfixmsg test/mhical/test-mhical \
        test/mhl/test-mhl-flags \
        test/mhlist/test-mhlist test/mhlist/test-ext-params \
        test/mhmail/test-mhmail \
@@ -88,12 +91,13 @@ TESTS = test/ali/test-ali test/anno/test-anno \
        test/post/test-post-group test/post/test-mts test/post/test-messageid \
        test/post/test-sendfiles test/prompter/test-prompter \
        test/rcv/test-rcvdist test/rcv/test-rcvpack test/rcv/test-rcvstore \
-       test/rcv/test-rcvtty test/refile/test-refile \
+       test/rcv/test-rcvtty test/refile/test-refile test/repl/test-convert \
        test/repl/test-if-str test/repl/test-trailing-newline \
        test/repl/test-multicomp test/repl/test-repl \
        test/scan/test-scan test/scan/test-scan-multibyte \
        test/sequences/test-flist test/sequences/test-mark \
        test/sequences/test-out-of-range \
+       test/show/test-show \
        test/slocal/test-slocal \
        test/whatnow/test-attach-detach test/whatnow/test-cd \
        test/whatnow/test-ls test/whom/test-whom \
@@ -102,14 +106,20 @@ TESTS = test/ali/test-ali test/anno/test-anno \
 check_SCRIPTS = test/common.sh
 check_PROGRAMS = test/getfullname test/getcanon test/fakepop test/fakesmtp \
                 test/getcwidth
-DISTCHECK_CONFIGURE_FLAGS = DISABLE_SETGID_MAIL=1
+
+## The location of installed nmhetcdir is, for all purposes except
+## distcheck, $nmhetcdir.  For distcheck, prepend $MH_INST_DIR (from
+## test/common.sh.in), which is based on $MH_TEST_DIR (from
+## $TESTS_ENVIRONMENT).
+DISTCHECK_CONFIGURE_FLAGS = DISABLE_SETGID_MAIL=1 \
+                           NMHETCDIRINST='$${abs_builddir}/test/testdir/inst'
 
 ##
 ## Stuff that should be cleaned via "make clean"
 ## automake 1.12.6 on FreeBSD 9 needs the sbr/dtimep.c.
 ##
 CLEANFILES = config/version.c sbr/sigmsg.h sbr/dtimep.c etc/mts.conf \
-            etc/gen-ctype-checked sbr/ctype-checked.h sbr/ctype-checked.c \
+            etc/gen-ctype-checked sbr/ctype-checked.[hc] \
             etc/mhn.defaults man/man.sed man/mh-chart.man $(man_MANS) \
             *.plist
 clean-local:
@@ -119,7 +129,7 @@ clean-local:
 ##
 ## Stuff that should be cleaned via "make maintainer-clean"
 ##
-MAINTAINERCLEANFILES = cscope.files cscope.out cscope.in.out cscope.po.out *.plist
+MAINTAINERCLEANFILES = atags cscope.files cscope.out cscope.in.out cscope.po.out *.plist
 
 ##
 ## And our own superclean, to get everything left by maintainer-clean.
@@ -143,7 +153,7 @@ BUILT_SOURCES = sbr/sigmsg.h sbr/ctype-checked.c
 ##
 bin_PROGRAMS = uip/ali uip/anno uip/burst uip/comp uip/dist uip/flist \
               uip/fmttest uip/folder uip/forw uip/inc uip/install-mh \
-              uip/mark uip/mhbuild uip/mhfixmsg uip/mhlist uip/mhn \
+              uip/mark uip/mhbuild uip/mhfixmsg uip/mhical uip/mhlist uip/mhn \
               uip/mhparam uip/mhpath uip/mhshow uip/mhstore uip/msgchk \
               uip/new uip/packf uip/pick uip/prompter uip/refile \
               uip/repl uip/rmf uip/rmm uip/scan uip/send uip/show uip/sortm \
@@ -178,7 +188,7 @@ noinst_LIBRARIES = sbr/libmh.a mts/libmts.a
 ## them, but that might change in the future.
 ##
 noinst_HEADERS = h/addrsbr.h h/aliasbr.h h/crawl_folders.h h/dropsbr.h \
-                h/fmt_compile.h h/fmt_scan.h h/md5.h h/mf.h \
+                h/fmt_compile.h h/fmt_scan.h h/icalendar.h h/md5.h h/mf.h \
                 h/mh.h h/mhcachesbr.h h/mhparse.h h/mime.h \
                 h/mts.h h/nmh.h h/picksbr.h h/popsbr.h h/prototypes.h \
                 h/rcvmail.h h/scansbr.h h/signals.h h/tws.h h/utils.h \
@@ -188,15 +198,17 @@ noinst_HEADERS = h/addrsbr.h h/aliasbr.h h/crawl_folders.h h/dropsbr.h \
 ## Extra files we need to install in various places
 ##
 dist_nmhetc_DATA = etc/MailAliases etc/components etc/digestcomps \
-                   etc/distcomps etc/forwcomps etc/mhl.body etc/mhl.digest \
-                   etc/mhl.format etc/mhl.forward etc/mhl.headers \
-                   etc/mhl.reply etc/mhshow.marker etc/rcvdistcomps \
-                   etc/rcvdistcomps.outbox etc/replcomps etc/replgroupcomps \
-                   etc/scan.MMDDYY \
-                   etc/scan.YYYYMMDD etc/scan.curses etc/scan.default \
-                   etc/scan.highlighted \
-                   etc/scan.mailx etc/scan.nomime etc/scan.size etc/scan.time \
-                   etc/scan.timely etc/scan.unseen
+                  etc/distcomps etc/forwcomps \
+                  etc/mhical.12hour etc/mhical.24hour \
+                  etc/mhl.body etc/mhl.digest etc/mhl.format etc/mhl.forward \
+                  etc/mhl.headers etc/mhl.reply etc/mhl.replywithoutbody \
+                  etc/mhshow.marker etc/rcvdistcomps etc/rcvdistcomps.outbox \
+                  etc/replcomps etc/replgroupcomps \
+                  etc/scan.MMDDYY \
+                  etc/scan.YYYYMMDD etc/scan.curses etc/scan.default \
+                  etc/scan.highlighted \
+                  etc/scan.mailx etc/scan.nomime etc/scan.size etc/scan.time \
+                  etc/scan.timely etc/scan.unseen
 
 ##
 ## The same as above, but we don't include these in the distribution
@@ -213,14 +225,16 @@ dist_doc_DATA = COPYRIGHT INSTALL NEWS README VERSION \
                docs/MAIL.FILTERING docs/MAILING-LISTS docs/README-ATTACHMENTS \
                docs/README-HOOKS docs/README-components docs/README.about \
                docs/README.SASL docs/README.developers docs/README.manpages \
-               docs/README-iCalendar docs/TODO
+               docs/TODO
 
 ##
 ## Contribs that get installed in docdir/contrib/
 ##
-contribdir = $(docdir)/contrib
-dist_contrib_SCRIPTS = docs/contrib/replyfilter docs/contrib/build_nmh \
-                      docs/contrib/ml docs/contrib/vpick
+docs_contribdir = $(docdir)/contrib
+dist_docs_contrib_SCRIPTS = docs/contrib/replyfilter docs/contrib/build_nmh \
+                           docs/contrib/ml docs/contrib/vpick
+dist_docs_contrib_DATA = docs/contrib/replaliases docs/contrib/sendfrom.c
+docs_contrib_PROGRAMS = docs/contrib/sendfrom
 
 ##
 ## Our man pages
@@ -232,8 +246,8 @@ man_MANS = man/ali.1 man/anno.1 man/ap.8 man/burst.1 man/comp.1 \
           man/mh-alias.5 man/mh-chart.7 man/mh-draft.5 man/mh-folders.5 \
           man/mh-format.5 man/mh-mail.5 man/mh-mime.7 man/mh-profile.5 \
           man/mh_profile.5 man/mh-sequence.5 man/mh-tailor.5 man/mhbuild.1 \
-          man/mhfixmsg.1 man/mhl.1 man/mhlist.1 man/mhmail.1 man/mhn.1 \
-          man/mhparam.1 man/mhpath.1 man/mhshow.1 man/mhstore.1 \
+          man/mhfixmsg.1 man/mhical.1 man/mhl.1 man/mhlist.1 man/mhmail.1 \
+          man/mhn.1 man/mhparam.1 man/mhpath.1 man/mhshow.1 man/mhstore.1 \
           man/mh-mkstemp.1 man/msgchk.1 man/mts.conf.5 man/new.1 \
           man/next.1 man/nmh.7 man/packf.1 man/pick.1 man/post.8 man/prev.1 \
           man/prompter.1 man/rcvdist.1 man/rcvpack.1 man/rcvstore.1 \
@@ -252,10 +266,10 @@ man_SRCS = man/ali.man man/anno.man man/ap.man man/burst.man man/comp.man \
           man/mh-chart-gen.sh man/mh-draft.man man/mh-folders.man \
           man/mh-format.man man/mh-mail.man man/mh-mime.man \
           man/mh-profile.man man/mh_profile.man man/mh-sequence.man \
-          man/mh-tailor.man man/mhbuild.man man/mhfixmsg.man man/mhl.man \
-          man/mhlist.man man/mhmail.man man/mhn.man man/mhparam.man \
-          man/mhpath.man man/mhshow.man man/mhstore.man man/mh-mkstemp.man \
-          man/msgchk.man man/mts.conf.man man/new.man \
+          man/mh-tailor.man man/mhbuild.man man/mhfixmsg.man man/mhical.man \
+          man/mhl.man man/mhlist.man man/mhmail.man man/mhn.man \
+          man/mhparam.man man/mhpath.man man/mhshow.man man/mhstore.man \
+          man/mh-mkstemp.man man/msgchk.man man/mts.conf.man man/new.man \
           man/next.man man/nmh.man man/packf.man man/pick.man man/post.man \
           man/prev.man man/prompter.man man/rcvdist.man man/rcvpack.man \
           man/rcvstore.man man/rcvtty.man man/refile.man man/repl.man \
@@ -267,8 +281,9 @@ man_SRCS = man/ali.man man/anno.man man/ap.man man/burst.man man/comp.man \
 ## Files we need to include in the distribution which aren't found by
 ## Automake using the automatic rules
 ##
-EXTRA_DIST = autogen.sh config/version.sh sbr/sigmsg.awk etc/mts.conf.in \
-            etc/mhn.defaults.sh etc/sendfiles $(MHNSEARCHPROG) DATE MACHINES \
+EXTRA_DIST = autogen.sh config/version.sh sbr/sigmsg.awk sbr/icalparse.h \
+            etc/mts.conf.in etc/mhn.defaults.sh etc/sendfiles \
+            $(MHNSEARCHPROG) DATE MACHINES \
             docs/ChangeLog_MH-3_to_MH-6.6 \
             docs/ChangeLog_MH-6.7.0_to_MH-6.8.4.html \
             test/README test/fakesendmail $(TESTS) test/inc/deb359167.mbox \
@@ -328,7 +343,8 @@ uip_mark_LDADD = $(LDADD) $(POSTLINK)
 
 uip_mhbuild_SOURCES = uip/mhbuild.c uip/mhbuildsbr.c uip/mhcachesbr.c \
                      uip/mhlistsbr.c uip/mhoutsbr.c uip/mhmisc.c  \
-                     uip/mhfree.c uip/mhparse.c uip/md5.c
+                     uip/mhfree.c uip/mhparse.c uip/md5.c \
+                     uip/mhstoresbr.c uip/mhshowsbr.c
 uip_mhbuild_LDADD = $(LDADD) $(TERMLIB) $(ICONVLIB) $(POSTLINK)
 
 uip_mhfixmsg_SOURCES = uip/mhfixmsg.c uip/mhparse.c uip/mhcachesbr.c \
@@ -336,6 +352,9 @@ uip_mhfixmsg_SOURCES = uip/mhfixmsg.c uip/mhparse.c uip/mhcachesbr.c \
                       uip/mhshowsbr.c uip/mhlistsbr.c uip/md5.c
 uip_mhfixmsg_LDADD = $(LDADD) $(TERMLIB) $(ICONVLIB) $(POSTLINK)
 
+uip_mhical_SOURCES = uip/mhical.c
+uip_mhical_LDADD = $(LDADD) $(TERMLIB) $(ICONVLIB) $(POSTLINK)
+
 uip_mhlist_SOURCES = uip/mhlist.c uip/mhparse.c uip/mhcachesbr.c \
                     uip/mhlistsbr.c uip/mhmisc.c uip/mhfree.c uip/md5.c
 uip_mhlist_LDADD = $(LDADD) $(TERMLIB) $(ICONVLIB) $(POSTLINK)
@@ -410,7 +429,7 @@ uip_whom_SOURCES = uip/whom.c uip/distsbr.c
 uip_whom_LDADD = $(LDADD) $(POSTLINK)
 
 ##
-## Programs definitions for all utilities that end up in $(nmhlibexecdir)
+## Program definitions for all utilities that end up in $(nmhlibexecdir)
 ##
 
 uip_ap_SOURCES = uip/ap.c
@@ -456,6 +475,10 @@ uip_viamail_LDADD = $(LDADD) $(POSTLINK)
 test_getfullname_SOURCES = test/getfullname.c
 test_getfullname_LDADD = $(LDADD) $(POSTLINK)
 
+##
+## Other program definitions
+##
+
 test_getcanon_SOURCES = test/getcanon.c
 test_getcanon_LDADD = $(POSTLINK)
 
@@ -477,9 +500,12 @@ etc_gen_ctype_checked_LDADD = $(POSTLINK)
 
 ## Hard-code the config/version.c target, instead of using $@, so this
 ## rule works for the distcheck target with Solaris (System V) make.
+docs_contrib_sendfrom_SOURCES = docs/contrib/sendfrom.c
+docs_contrib_sendfrom_LDADD = $(LDADD) $(TERMLIB) $(CURLLIB) $(POSTLINK)
+
 ## distcheck uses VPATH, causes that make to prepend the VPATH to $@.
-config/version.c: Makefile
-       sh $(srcdir)/config/version.sh $(VERSION) > ./config/version.c
+config/version.c: Makefile $(srcdir)/config/version.sh
+       env srcdir="$(srcdir)" sh $(srcdir)/config/version.sh $(VERSION) > ./config/version.c
 
 sbr/sigmsg.h: $(srcdir)/sbr/sigmsg.awk $(SIGNAL_H)
        $(AWK) -f $(srcdir)/sbr/sigmsg.awk $(SIGNAL_H) > $@
@@ -561,12 +587,14 @@ sbr_libmh_a_SOURCES = sbr/addrsbr.c sbr/ambigsw.c sbr/atooi.c sbr/arglist.c \
                      sbr/error.c sbr/ext_hook.c sbr/fdcompare.c \
                      sbr/folder_addmsg.c sbr/folder_delmsgs.c \
                      sbr/folder_free.c sbr/folder_pack.c \
-                     sbr/folder_read.c sbr/folder_realloc.c sbr/gans.c \
-                     sbr/getans.c sbr/getanswer.c sbr/getarguments.c \
+                     sbr/folder_read.c sbr/folder_realloc.c sbr/read_switch.c \
+                     sbr/read_switch_multiword.c sbr/read_yes_or_no_if_tty.c sbr/getarguments.c \
                      sbr/getcpy.c sbr/geteditor.c sbr/getfolder.c \
-                     sbr/getpass.c \
+                     sbr/getpass.c sbr/read_line.c \
                      sbr/fmt_addr.c sbr/fmt_compile.c sbr/fmt_new.c \
-                     sbr/fmt_rfc2047.c sbr/fmt_scan.c sbr/lock_file.c \
+                     sbr/fmt_rfc2047.c sbr/fmt_scan.c \
+                     sbr/icalparse.y sbr/icalendar.l sbr/datetime.c \
+                     sbr/lock_file.c \
                      sbr/m_atoi.c sbr/m_backup.c sbr/m_convert.c \
                      sbr/m_draft.c sbr/m_getfld.c sbr/m_gmprot.c \
                      sbr/m_maildir.c sbr/m_name.c sbr/m_popen.c sbr/m_rand.c \
@@ -586,7 +614,7 @@ sbr_libmh_a_SOURCES = sbr/addrsbr.c sbr/ambigsw.c sbr/atooi.c sbr/arglist.c \
                      sbr/trimcpy.c sbr/unquote.c \
                      sbr/uprf.c sbr/vfgets.c \
                      sbr/mf.c sbr/utils.c sbr/ctype-checked.c \
-                     sbr/m_mktemp.c sbr/getansreadline.c sbr/vector.c \
+                     sbr/m_mktemp.c sbr/read_switch_multiword_via_readline.c sbr/vector.c \
                      config/config.c config/version.c
 
 ##
@@ -596,10 +624,13 @@ sbr_libmh_a_SOURCES = sbr/addrsbr.c sbr/ambigsw.c sbr/atooi.c sbr/arglist.c \
 
 config/sbr_libmh_a-config.$(OBJEXT) sbr/sbr_libmh_a-mts.$(OBJEXT): Makefile
 
-sbr_libmh_a_CPPFLAGS = -I./sbr -DNMHETCDIR='"$(nmhetcdir)"' \
+sbr_libmh_a_CPPFLAGS = -I./sbr \
+               -DNMHBINDIR='"$(bindir)"' \
+               -DNMHLIBEXECDIR='"$(nmhlibexecdir)"' \
+               -DNMHETCDIR='"@nmhetcdirinst@$(nmhetcdir)"' \
+               -DNMHDOCDIR='"@docdir@"' \
                -DMAILSPOOL='"$(mailspool)"' \
-               -DSENDMAILPATH='"$(sendmailpath)"' -DNMHBINDIR='"$(bindir)"' \
-               -DNMHLIBEXECDIR='"$(nmhlibexecdir)"'
+               -DSENDMAILPATH='"$(sendmailpath)"'
 
 mts_libmts_a_SOURCES = mts/smtp/smtp.c