2 ## Our Makefile.am template for Makefile.in (and, eventually, Makefile)
4 ## Process this with automake to generate Makefile.in
7 ## We set this to get our autoconf macros in the m4 directory
8 ACLOCAL_AMFLAGS = -I m4
11 ## This is the default set of libraries all programs link against. Some
12 ## programs add extra libraries to this set, so they override this with
13 ## a program-specific LDADD variable. Note that in all of the cases today
14 ## LDADD is included in the program-specific LDADD since we want to add
15 ## to this list of libraries, not replace it.
17 LDADD = sbr/libmh.a sbr/libdtimep.a
20 ## These are used to create the default mhn.defaults config file
21 ## MHNSEARCHPATH is the default path to look for MIME content handlers
22 ## MHNSEARCHPROG is the script used to find the support programs
24 MHNSEARCHPATH = "$(PATH):/usr/demo/SOUND"
25 MHNSEARCHPROG = $(srcdir)/etc/mhn.find.sh
28 ## Automake doesn't let us install programs in $(libdir), so we create our
29 ## own directory prefix to use in the primary variable.
34 ## nmh _does_ have a test suite!
36 TESTS_ENVIRONMENT = MH_OBJ_DIR=@abs_builddir@ \
37 MH_TEST_DIR=@abs_builddir@/test/testdir \
38 auxexecdir=$(auxexecdir) bindir=$(bindir) \
39 mandir=$(mandir) sysconfdir=$(sysconfdir)
41 ## Important note: the "cleanup" test should always be last
43 TESTS = test/bad-input/test-header \
44 test/burst/test-burst \
45 test/comp/test-comp-format \
46 test/folder/test-create \
47 test/folder/test-total test/format/test-localmbox \
48 test/format/test-myname test/format/test-myhost \
49 test/format/test-mymbox \
50 test/forw/test-forw-digest \
51 test/forw/test-forw-format \
52 test/inc/test-deb359167 test/inc/test-eom-align \
53 test/inc/test-inc-scanout test/install-mh/test-install-mh \
54 test/manpages/test-manpages test/mhbuild/test-forw \
55 test/mhlist/test-mhlist test/mhparam/test-mhparam \
56 test/mhpath/test-mhpath \
57 test/mhshow/test-cte-binary test/mhshow/test-qp \
58 test/mhshow/test-subpart test/mhstore/test-mhstore \
60 test/pick/test-pick test/pick/test-stderr \
61 test/post/test-post-basic test/post/test-post-multiple \
62 test/post/test-post-dcc test/post/test-post-fcc \
63 test/post/test-post-multifrom test/post/test-post-envelope \
64 test/post/test-post-group \
65 test/refile/test-refile \
66 test/repl/test-if-str test/repl/test-trailing-newline \
67 test/repl/test-multicomp \
69 test/sequences/test-flist test/sequences/test-mark \
70 test/whatnow/test-attach-detach test/whatnow/test-cd \
71 test/whatnow/test-ls test/whom/test-whom \
72 test/cleanup ## The "cleanup" test should always be last.
74 check_SCRIPTS = test/common.sh
75 check_PROGRAMS = test/getfullname test/getfqdn test/fakesmtp
78 ## Stuff that should be cleaned via "make clean"
80 CLEANFILES = config/version.c sbr/sigmsg.h etc/mts.conf etc/sendfiles \
81 etc/mhn.defaults man/man.sed man/mh-chart.man $(man_MANS)
83 @rm -rf RPM a.out.DSYM uip/a.out.DSYM
87 ## Stuff that should be cleaned via "make maintainer-clean"
89 MAINTAINERCLEANFILES = cscope.files cscope.out
92 ## And our own superclean, to get everything left by maintainer-clean.
94 SUPERCLEANFILES = ChangeLog Makefile.in aclocal.m4 compile config.guess \
95 config.h.in config.h.in~ config.sub configure depcomp \
96 install-sh missing ylwrap nmh-*.tar.gz
97 superclean: maintainer-clean
98 @rm -f $(SUPERCLEANFILES)
102 ## Files that need to be built before everything else
104 BUILT_SOURCES = sbr/sigmsg.h
107 ## This is a list of all programs that get installed in the "bin" directory
108 ## Note that primary difference between "PROGRAMS" and "SCRIPTS" is that
109 ## the latter do not have $(EXEEXT) added on the end.
111 bin_PROGRAMS = uip/ali uip/anno uip/burst uip/comp uip/dist uip/flist \
112 uip/folder uip/forw uip/inc uip/install-mh uip/mark \
113 uip/mhbuild uip/mhlist uip/mhmail uip/mhn uip/mhparam \
114 uip/mhpath uip/mhshow uip/mhstore uip/msgchk uip/msh uip/new \
115 uip/packf uip/pick uip/prompter uip/refile uip/repl uip/rmf \
116 uip/rmm uip/scan uip/send uip/show uip/sortm uip/whatnow \
119 bin_SCRIPTS = etc/sendfiles
122 ## This is all programs that get installed in the "lib" directory
124 auxexec_PROGRAMS = uip/ap uip/conflict uip/dp uip/fmtdump uip/mhl uip/post \
125 uip/rcvdist uip/rcvpack uip/rcvstore uip/rcvtty uip/slocal \
126 uip/spost uip/viamail uip/mhtest
129 ## Internal libraries that we create as part of the build process
130 ## but do not install
132 noinst_LIBRARIES = sbr/libmh.a sbr/libdtimep.a mts/libmts.a
135 ## These are all of our header files. Right now we don't install any of
136 ## them, but that might change in the future.
138 noinst_HEADERS = h/addrsbr.h h/aliasbr.h h/crawl_folders.h h/dropsbr.h \
139 h/fmt_compile.h h/fmt_scan.h h/md5.h h/mf.h \
140 h/mh.h h/mhcachesbr.h h/mhparse.h h/mime.h h/msh.h \
141 h/mts.h h/nmh.h h/picksbr.h h/popsbr.h h/prototypes.h \
142 h/rcvmail.h h/scansbr.h h/signals.h h/tws.h h/utils.h \
143 h/vmhsbr.h mts/smtp/smtp.h
146 ## Extra files we need to install in various places
148 dist_sysconf_DATA = etc/MailAliases etc/components etc/digestcomps \
149 etc/distcomps etc/forwcomps etc/mhl.body etc/mhl.digest \
150 etc/mhl.format etc/mhl.forward etc/mhl.headers \
151 etc/mhl.reply etc/rcvdistcomps etc/rcvdistcomps.outbox \
152 etc/replcomps etc/replgroupcomps etc/scan.MMDDYY \
153 etc/scan.YYYYMMDD etc/scan.default etc/scan.mailx \
154 etc/scan.nomime etc/scan.size etc/scan.time \
155 etc/scan.timely etc/scan.unseen
158 ## The same as above, but we don't include these in the distribution
159 ## (because they're generated at compile time)
161 sysconf_DATA = etc/mhn.defaults etc/mts.conf
164 ## Documentation that gets installed in docdir
166 dist_doc_DATA = COPYRIGHT VERSION docs/COMPLETION-BASH docs/COMPLETION-TCSH \
167 docs/COMPLETION-ZSH docs/DIFFERENCES docs/FAQ \
168 docs/MAIL.FILTERING docs/MAILING-LISTS docs/README-ATTACHMENTS \
169 docs/README-HOOKS docs/README-components docs/README.about \
170 docs/README.SASL docs/README.developers docs/README.manpages \
174 ## Contribs that get installed in docdir/contrib/
176 contribdir = $(docdir)/contrib
177 dist_contrib_DATA = docs/contrib/nmh.spec docs/contrib/replyfilter
182 man_MANS = man/ali.1 man/anno.1 man/ap.8 man/burst.1 man/comp.1 \
183 man/conflict.8 man/dist.1 man/dp.8 man/flist.1 man/flists.1 \
184 man/fmtdump.8 man/fnext.1 man/folder.1 man/folders.1 \
185 man/forw.1 man/fprev.1 man/inc.1 man/install-mh.1 man/mark.1 \
186 man/mh-alias.5 man/mh-chart.1 man/mh-draft.5 man/mh-format.5 \
187 man/mh-mail.5 man/mh-profile.5 man/mh-sequence.5 \
188 man/mh-tailor.5 man/mhbuild.1 man/mhl.1 man/mhlist.1 \
189 man/mhmail.1 man/mhn.1 man/mhparam.1 man/mhpath.1 \
190 man/mhshow.1 man/mhstore.1 man/msgchk.1 man/msh.1 \
191 man/mts.conf.5 man/new.1 man/next.1 man/nmh.1 man/packf.1 \
192 man/pick.1 man/post.8 man/prev.1 man/prompter.1 man/rcvdist.1 \
193 man/rcvpack.1 man/rcvstore.1 man/rcvtty.1 man/refile.1 \
194 man/repl.1 man/rmf.1 man/rmm.1 man/scan.1 man/send.1 \
195 man/sendfiles.1 man/show.1 man/slocal.1 man/sortm.1 man/unseen.1 \
196 man/whatnow.1 man/whom.1
199 ## Files we need to include in the distribution which aren't found by
200 ## Automake using the automatic rules
202 EXTRA_DIST = config/version.sh sbr/sigmsg.awk etc/mts.conf.in etc/sendfiles.in \
203 etc/mhn.defaults.sh $(MHNSEARCHPROG) DATE \
204 docs/ChangeLog_MH-3_to_MH-6.6 \
205 docs/ChangeLog_MH-6.7.0_to_MH-6.8.4.html \
206 man/ali.man man/anno.man man/ap.man man/burst.man man/comp.man \
207 man/conflict.man man/dist.man man/dp.man man/flist.man \
208 man/flists.man man/fmtdump.man man/fnext.man man/folder.man \
209 man/folders.man man/forw.man man/fprev.man man/inc.man \
210 man/install-mh.man man/mark.man man/mh-alias.man \
211 man/mh-chart-gen.sh man/mh-draft.man man/mh-format.man \
212 man/mh-mail.man man/mh-profile.man man/mh-sequence.man \
213 man/mh-tailor.man man/mhbuild.man man/mhl.man man/mhlist.man \
214 man/mhmail.man man/mhn.man man/mhparam.man man/mhpath.man \
215 man/mhshow.man man/mhstore.man man/msgchk.man man/msh.man \
216 man/mts.conf.man man/new.man man/next.man man/nmh.man \
217 man/packf.man man/pick.man man/post.man man/prev.man \
218 man/prompter.man man/rcvdist.man man/rcvpack.man \
219 man/rcvstore.man man/rcvtty.man man/refile.man man/repl.man \
220 man/rmf.man man/rmm.man man/scan.man man/send.man \
221 man/sendfiles.man man/show.man man/slocal.man man/sortm.man \
222 man/unseen.man man/whatnow.man man/whom.man \
223 test/README $(TESTS) test/inc/deb359167.mbox \
224 test/inc/fromline.txt test/inc/msgheader.txt test/inc/filler.txt \
225 test/inc/md5sums test/post/test-post-common.sh
228 ## These are all of the definitions for each of the programs listed above.
229 ## They describe the source files that make up the programs and any particular
230 ## overrides that are used to select different library options from the
233 uip_ali_SOURCES = uip/ali.c uip/aliasbr.c
235 uip_anno_SOURCES = uip/anno.c uip/annosbr.c
237 uip_burst_SOURCES = uip/burst.c
239 uip_comp_SOURCES = uip/comp.c uip/whatnowproc.c uip/whatnowsbr.c uip/sendsbr.c \
240 uip/annosbr.c uip/distsbr.c
241 uip_comp_LDADD = $(LDADD) $(ICONVLIB) $(READLINELIB)
243 uip_dist_SOURCES = uip/dist.c uip/whatnowproc.c uip/whatnowsbr.c uip/sendsbr.c \
244 uip/annosbr.c uip/distsbr.c uip/forwsbr.c
245 uip_dist_LDADD = $(LDADD) $(ICONVLIB) $(READLINELIB)
247 uip_flist_SOURCES = uip/flist.c
249 uip_folder_SOURCES = uip/folder.c
251 uip_forw_SOURCES = uip/forw.c uip/whatnowproc.c uip/whatnowsbr.c uip/sendsbr.c \
252 uip/annosbr.c uip/distsbr.c uip/forwsbr.c
253 uip_forw_LDADD = $(LDADD) $(ICONVLIB) $(READLINELIB)
255 uip_inc_SOURCES = uip/inc.c uip/scansbr.c uip/dropsbr.c uip/termsbr.c \
257 uip_inc_LDADD = $(LDADD) $(TERMLIB) $(ICONVLIB) $(SASLLIB)
259 uip_install_mh_SOURCES = uip/install-mh.c
261 uip_mark_SOURCES = uip/mark.c
263 uip_mhbuild_SOURCES = uip/mhbuild.c uip/mhbuildsbr.c uip/mhcachesbr.c \
264 uip/mhlistsbr.c uip/mhoutsbr.c uip/mhmisc.c \
265 uip/mhfree.c uip/mhparse.c uip/termsbr.c uip/md5.c
266 uip_mhbuild_LDADD = $(LDADD) $(TERMLIB)
268 uip_mhlist_SOURCES = uip/mhlist.c uip/mhparse.c uip/mhcachesbr.c \
269 uip/mhlistsbr.c uip/mhmisc.c uip/mhfree.c uip/termsbr.c \
271 uip_mhlist_LDADD = $(LDADD) $(TERMLIB)
273 uip_mhmail_SOURCES = uip/mhmail.c
275 uip_mhn_SOURCES = uip/mhn.c uip/mhparse.c uip/mhcachesbr.c uip/mhshowsbr.c \
276 uip/mhlistsbr.c uip/mhstoresbr.c uip/mhmisc.c uip/mhfree.c \
277 uip/termsbr.c uip/md5.c
278 uip_mhn_LDADD = $(LDADD) $(TERMLIB)
280 uip_mhparam_SOURCES = uip/mhparam.c
282 uip_mhpath_SOURCES = uip/mhpath.c
284 uip_mhshow_SOURCES = uip/mhshow.c uip/mhparse.c uip/mhcachesbr.c \
285 uip/mhshowsbr.c uip/mhlistsbr.c uip/mhmisc.c \
286 uip/mhfree.c uip/termsbr.c uip/md5.c
287 uip_mhshow_LDADD = $(LDADD) $(TERMLIB)
289 uip_mhstore_SOURCES = uip/mhstore.c uip/mhparse.c uip/mhcachesbr.c \
290 uip/mhshowsbr.c uip/mhlistsbr.c uip/mhstoresbr.c \
291 uip/mhmisc.c uip/mhfree.c uip/termsbr.c uip/md5.c
292 uip_mhstore_LDADD = $(LDADD) $(TERMLIB)
294 uip_msgchk_SOURCES = uip/msgchk.c uip/popsbr.c
295 uip_msgchk_LDADD = $(LDADD) $(SASLLIB)
297 uip_msh_SOURCES = uip/msh.c uip/mshcmds.c uip/vmhsbr.c uip/picksbr.c \
298 uip/scansbr.c uip/dropsbr.c uip/mhlsbr.c uip/termsbr.c
299 uip_msh_LDADD = $(LDADD) $(TERMLIB) $(ICONVLIB)
301 uip_new_SOURCES = uip/new.c
303 uip_packf_SOURCES = uip/packf.c uip/dropsbr.c
305 uip_pick_SOURCES = uip/pick.c uip/picksbr.c
307 uip_prompter_SOURCES = uip/prompter.c
309 uip_refile_SOURCES = uip/refile.c
311 uip_repl_SOURCES = uip/repl.c uip/replsbr.c uip/whatnowproc.c \
312 uip/whatnowsbr.c uip/sendsbr.c uip/annosbr.c uip/distsbr.c
313 uip_repl_LDADD = $(LDADD) $(ICONVLIB) $(READLINELIB)
315 uip_rmf_SOURCES = uip/rmf.c
317 uip_rmm_SOURCES = uip/rmm.c
319 uip_scan_SOURCES = uip/scan.c uip/scansbr.c uip/termsbr.c
320 uip_scan_LDADD = $(LDADD) $(TERMLIB) $(ICONVLIB)
322 uip_send_SOURCES = uip/send.c uip/sendsbr.c uip/annosbr.c uip/distsbr.c
324 uip_show_SOURCES = uip/show.c uip/mhlsbr.c uip/termsbr.c
325 uip_show_LDADD = $(LDADD) $(TERMLIB) $(ICONVLIB)
327 uip_sortm_SOURCES = uip/sortm.c
329 uip_whatnow_SOURCES = uip/whatnow.c uip/whatnowsbr.c uip/sendsbr.c \
330 uip/annosbr.c uip/distsbr.c
331 uip_whatnow_LDADD = $(LDADD) $(READLINELIB)
333 uip_whom_SOURCES = uip/whom.c uip/distsbr.c
336 ## Programs definitions for all utilities that end up in $(libdir)
339 uip_ap_SOURCES = uip/ap.c uip/termsbr.c
340 uip_ap_LDADD = $(LDADD) $(TERMLIB) $(ICONVLIB)
342 uip_conflict_SOURCES = uip/conflict.c uip/aliasbr.c
344 uip_dp_SOURCES = uip/dp.c uip/termsbr.c
345 uip_dp_LDADD = $(LDADD) $(TERMLIB) $(ICONVLIB)
347 uip_fmtdump_SOURCES = uip/fmtdump.c
348 uip_fmtdump_LDADD = $(LDADD) $(ICONVLIB)
350 uip_mhl_SOURCES = uip/mhl.c uip/mhlsbr.c uip/termsbr.c
351 uip_mhl_LDADD = $(LDADD) $(TERMLIB) $(ICONVLIB)
353 uip_mhtest_SOURCES = uip/mhtest.c uip/mhparse.c uip/mhcachesbr.c \
354 uip/mhoutsbr.c uip/mhmisc.c uip/mhfree.c \
355 uip/termsbr.c uip/md5.c
356 uip_mhtest_LDADD = $(LDADD) $(TERMLIB)
358 uip_post_SOURCES = uip/post.c uip/aliasbr.c
359 uip_post_LDADD = mts/libmts.a $(LDADD) $(SASLLIB)
361 uip_rcvdist_SOURCES = uip/rcvdist.c uip/distsbr.c
362 uip_rcvdist_LDADD = $(LDADD) $(ICONVLIB)
364 uip_rcvpack_SOURCES = uip/rcvpack.c uip/dropsbr.c
366 uip_rcvstore_SOURCES = uip/rcvstore.c
368 uip_rcvtty_SOURCES = uip/rcvtty.c uip/scansbr.c uip/termsbr.c
369 uip_rcvtty_LDADD = $(LDADD) $(TERMLIB) $(ICONVLIB)
371 uip_slocal_SOURCES = uip/slocal.c uip/aliasbr.c uip/dropsbr.c
372 uip_slocal_LDADD = $(LDADD) $(NDBM_LIBS)
374 uip_spost_SOURCES = uip/spost.c uip/aliasbr.c
376 uip_viamail_SOURCES = uip/viamail.c uip/mhmisc.c uip/mhoutsbr.c uip/sendsbr.c \
377 uip/annosbr.c uip/distsbr.c
379 test_getfullname_SOURCES = test/getfullname.c
380 test_getfullname_LDADD = sbr/libmh.a
382 test_getfqdn_SOURCES = test/getfqdn.c
385 test_fakesmtp_SOURCES = test/fakesmtp.c
386 test_fakesmtp_LDADD =
389 ## Our rebuild rules for files that aren't built via the normal mechanisms
391 config/version.c: Makefile
392 sh $(srcdir)/config/version.sh $(VERSION) > $@
394 sbr/sigmsg.h: $(srcdir)/sbr/sigmsg.awk $(SIGNAL_H)
395 $(AWK) -f $(srcdir)/sbr/sigmsg.awk $(SIGNAL_H) > $@
397 etc/mts.conf: $(srcdir)/etc/mts.conf.in Makefile
399 $(SED) -e 's,%mts%,$(MTS),' \
400 -e 's,%mailspool%,$(mailspool),' \
401 -e 's,%smtpservers%,$(smtpservers),' \
402 < $(srcdir)/etc/mts.conf.in > $@
404 etc/mhn.defaults: $(srcdir)/etc/mhn.defaults.sh $(MHNSEARCHPROG)
406 $(srcdir)/etc/mhn.defaults.sh $(MHNSEARCHPATH) $(MHNSEARCHPROG) > $@
408 etc/sendfiles: $(srcdir)/etc/sendfiles.in Makefile
410 $(SED) -e 's,%libdir%,$(libdir),' < $(srcdir)/etc/sendfiles.in > $@
413 ## This rule gets called at "make install" time; we use it to create links
414 ## between different programs.
417 rm -f $(DESTDIR)$(bindir)/flists$(EXEEXT)
418 rm -f $(DESTDIR)$(bindir)/folders$(EXEEXT)
419 rm -f $(DESTDIR)$(bindir)/fnext$(EXEEXT)
420 rm -f $(DESTDIR)$(bindir)/fprev$(EXEEXT)
421 rm -f $(DESTDIR)$(bindir)/unseen$(EXEEXT)
422 rm -f $(DESTDIR)$(bindir)/prev$(EXEEXT)
423 rm -f $(DESTDIR)$(bindir)/next$(EXEEXT)
424 ln $(DESTDIR)$(bindir)/flist$(EXEEXT) $(DESTDIR)$(bindir)/flists$(EXEEXT)
425 ln $(DESTDIR)$(bindir)/folder$(EXEEXT) $(DESTDIR)$(bindir)/folders$(EXEEXT)
426 ln $(DESTDIR)$(bindir)/new$(EXEEXT) $(DESTDIR)$(bindir)/fnext$(EXEEXT)
427 ln $(DESTDIR)$(bindir)/new$(EXEEXT) $(DESTDIR)$(bindir)/fprev$(EXEEXT)
428 ln $(DESTDIR)$(bindir)/new$(EXEEXT) $(DESTDIR)$(bindir)/unseen$(EXEEXT)
429 ln $(DESTDIR)$(bindir)/show$(EXEEXT) $(DESTDIR)$(bindir)/prev$(EXEEXT)
430 ln $(DESTDIR)$(bindir)/show$(EXEEXT) $(DESTDIR)$(bindir)/next$(EXEEXT)
431 if test x$(SETGID_MAIL) != x; then \
432 chgrp $(MAIL_SPOOL_GRP) $(DESTDIR)$(bindir)/inc$(EXEEXT); \
433 chmod 2755 $(DESTDIR)$(bindir)/inc$(EXEEXT); \
437 rm -f $(DESTDIR)$(man5dir)/mh_profile.5
438 ln $(DESTDIR)$(man5dir)/mh-profile.5 $(DESTDIR)$(man5dir)/mh_profile.5
440 ## Make sure we remove those links at uninstall time
443 rm -f $(DESTDIR)$(bindir)/flists$(EXEEXT)
444 rm -f $(DESTDIR)$(bindir)/folders$(EXEEXT)
445 rm -f $(DESTDIR)$(bindir)/fnext$(EXEEXT)
446 rm -f $(DESTDIR)$(bindir)/fprev$(EXEEXT)
447 rm -f $(DESTDIR)$(bindir)/unseen$(EXEEXT)
448 rm -f $(DESTDIR)$(bindir)/prev$(EXEEXT)
449 rm -f $(DESTDIR)$(bindir)/next$(EXEEXT)
450 rm -f $(DESTDIR)$(man5dir)/mh_profile.5
453 ## Our rules to build our internal libraries (libmh.a, libmts.a)
455 sbr_libmh_a_SOURCES = sbr/addrsbr.c sbr/ambigsw.c sbr/atooi.c sbr/brkstring.c \
456 sbr/check_charset.c sbr/client.c sbr/closefds.c \
457 sbr/concat.c sbr/context_del.c sbr/context_find.c \
458 sbr/context_foil.c sbr/context_read.c \
459 sbr/context_replace.c sbr/context_save.c \
460 sbr/copy.c sbr/copyip.c sbr/cpydata.c \
461 sbr/cpydgst.c sbr/crawl_folders.c sbr/discard.c \
462 sbr/done.c sbr/dtime.c sbr/escape_display_name.c \
463 sbr/error.c sbr/ext_hook.c sbr/fdcompare.c \
464 sbr/folder_addmsg.c sbr/folder_delmsgs.c \
465 sbr/folder_free.c sbr/folder_pack.c \
466 sbr/folder_read.c sbr/folder_realloc.c sbr/gans.c \
467 sbr/getans.c sbr/getanswer.c sbr/getarguments.c \
468 sbr/getcpy.c sbr/getfolder.c sbr/getpass.c \
469 sbr/fmt_addr.c sbr/fmt_compile.c sbr/fmt_new.c \
470 sbr/fmt_rfc2047.c sbr/fmt_scan.c sbr/lock_file.c \
471 sbr/m_atoi.c sbr/m_backup.c sbr/m_convert.c \
472 sbr/m_draft.c sbr/m_getfld.c sbr/m_gmprot.c \
473 sbr/m_maildir.c sbr/m_name.c \
474 sbr/makedir.c sbr/mts.c sbr/norm_charmap.c sbr/path.c \
475 sbr/peekc.c sbr/pidwait.c sbr/pidstatus.c \
476 sbr/print_help.c sbr/print_sw.c sbr/print_version.c \
477 sbr/push.c sbr/putenv.c sbr/refile.c sbr/remdir.c \
478 sbr/r1bindex.c sbr/readconfig.c sbr/ruserpass.c \
479 sbr/seq_add.c sbr/seq_bits.c sbr/seq_del.c \
480 sbr/seq_getnum.c sbr/seq_list.c sbr/seq_nameok.c \
481 sbr/seq_print.c sbr/seq_read.c sbr/seq_save.c \
482 sbr/seq_setcur.c sbr/seq_setprev.c sbr/seq_setunseen.c \
483 sbr/showfile.c sbr/signals.c sbr/smatch.c \
484 sbr/snprintb.c sbr/ssequal.c sbr/strcasecmp.c \
485 sbr/strindex.c sbr/trimcpy.c sbr/uprf.c sbr/vfgets.c \
486 sbr/fmt_def.c sbr/m_msgdef.c sbr/mf.c sbr/utils.c \
487 sbr/m_mktemp.c sbr/getansreadline.c config/config.c \
490 sbr_libmh_a_CPPFLAGS = -I./sbr -DNMHETCDIR='"$(sysconfdir)"' \
491 -DMAILSPOOL='"$(mailspool)"' \
492 -DSENDMAILPATH='"$(sendmailpath)"' -DNMHBINDIR='"$(bindir)"' \
493 -DNMHLIBDIR='"$(libdir)"' \
494 -DDEFAULT_EDITOR='"$(editorpath)"' \
495 -DDEFAULT_PAGER='"$(pagerpath)"'
497 sbr_libdtimep_a_SOURCES = sbr/dtimep.l
498 sbr_libdtimep_a_CFLAGS = $(sbr_libmh_a_CPPFLAGS) $(DISABLE_UNUSED_MACROS_WARNING)
500 mts_libmts_a_SOURCES = mts/smtp/smtp.c
503 ## Our rules for generating man pages (both the rule for man.sed and
504 ## the implicit rules for man page generation).
510 $(man_MANS): man/man.sed
512 man/man.sed: Makefile
513 @echo 's,%nmhwarning%,THIS FILE HAS BEEN AUTOMATICALLY GENERATED. DO NOT EDIT.,g' > $@
514 @echo 's,%nmhversion%,nmh-$(VERSION),g' >> $@
515 @echo 's,%nmhdate%,$(DATE),g' >> $@
516 @echo 's,%bindir%,$(bindir),g' >> $@
517 @echo 's,%etcdir%,$(sysconfdir),g' >> $@
518 @echo 's,%libdir%,$(libdir),g' >> $@
519 @echo 's,%mandir%,$(mandir),g' >> $@
520 @echo 's,%mailspool%,$(mailspool),g' >> $@
521 @echo 's,%sendmailpath%,$(sendmailpath),g' >> $@
522 @echo 's,%default_editor%,$(editorpath),g' >> $@
523 @echo 's,%default_pager%,$(pagerpath),g' >> $@
524 @echo 's,%manext1%,$(manext1),g' >> $@
525 @echo 's,%manext5%,$(manext5),g' >> $@
526 @echo 's,%manext8%,$(manext8),g' >> $@
527 @echo '/%mhl_forward%/r $(top_srcdir)/etc/mhl.forward' >> $@
528 @echo ' s,%mhl_forward%,,g' >> $@
529 @echo '/%mhl_format%/r $(top_srcdir)/etc/mhl.format' >> $@
530 @echo ' s,%mhl_format%,,g' >> $@
531 @echo '/%mhl_reply%/r $(top_srcdir)/etc/mhl.reply' >> $@
532 @echo ' s,%mhl_reply%,,g' >> $@
535 @$(srcdir)/man/mh-chart-gen.sh > $@
538 @$(SED) -f man/man.sed $< > $@
541 @$(SED) -f man/man.sed $< > $@
544 @$(SED) -f man/man.sed $< > $@
546 ## Don't include commit hashes in ChangeLog.
548 @[ -d .git ] && git --no-pager log --abbrev-commit | \
549 egrep -v '^commit [0-9a-f]+$$' > $@ || true
550 ## Make ChangeLog phony so it will always get regenerated. But don't
551 ## fail if we don't have a git repository in order to allow
552 ## regeneration of distribution archive or RPM.
556 ## Our RPM build target
559 @test -d $(rpmdir)/SOURCES || $(MKDIR_P) $(rpmdir)/SOURCES
560 @test -d $(rpmdir)/SPECS || $(MKDIR_P) $(rpmdir)/SPECS
561 @mv -f $(DIST_ARCHIVES) $(rpmdir)/SOURCES
562 @cp -p VERSION $(rpmdir)/SOURCES
563 @cp -p docs/contrib/nmh.spec $(rpmdir)/SPECS
564 @rpmbuild --define '_topdir $(rpmdir)' \
565 --define '_tmppath %{_topdir}/TMP' \
566 --define "_sysconfdir $(DESTDIR)$(sysconfdir)" \
567 -ba $(rpmdir)/SPECS/nmh.spec
571 ## A target to build information needed by cscope
574 echo "-I $(srcdir)/h -I $(srcdir)/sbr -I $(srcdir)/uip -I $(srcdir)/mts/smtp" > cscope.files
575 find $(srcdir) \( -name \*.c -o -name \*.l \) -print | grep -v dtimep.c >> cscope.files
580 ## Use GNU gcov to find the coverage of the test suite.
581 ## These targets are not integrated into the other automake
582 ## targets because they will be used so infrequently, if at all.
585 @if ./config.status --config | grep -e --enable-debug >/dev/null; then \
586 echo For best results with gcov, configure without --enable-debug; \
588 @echo rebuilding with AM_CFLAGS=--coverage . . .
589 @(make clean && make AM_CFLAGS=--coverage) > /dev/null && \
590 make check AM_CFLAGS=--coverage
591 @for i in `find . -name '*.gcda'`; do \
592 gcov -p -o `echo $$i | $(SED) 's%\\(.*\\)/%\\1 %'`; \
594 @for i in `find . -name '*.gcno'`; do \
595 if ! test -f `echo $$i | sed 's%\.gcno%.gcda%'`; then \
596 echo untested: $$i; \
600 @find . -name '*.gcno' -o -name '*.gcda' | xargs rm
601 gcov-clean: gcov-mostlyclean
602 @find . -name '*.gcov' | xargs rm
603 .PHONY: gcov gcov-mostlyclean gcov-clean
607 ## Rules to upload the distribution to savannah
610 @if test -z "$(SAVANNAH_USERNAME)"; then \
611 echo "You need to set SAVANNAH_USERNAME to the your username on savannah.gnu.org." ;\
612 echo "You can set it either in your environment or on the make command line."; \
615 @echo "Did you run 'make distcheck' already?"
616 @if test -z "$(SKIP_GPG_SIG)"; then \
617 echo "Creating GPG signature (set SKIP_GPG_SIG to bypass this step)"; \
618 gpg --output $(DIST_ARCHIVES).sig --detatch-sig $(DIST_ARCHIVES); \
620 @echo "Setting permissions for savannah.gnu.org"
621 chmod 664 $(DIST_ARCHIVES)
622 if test -f $(DIST_ARCHIVES).sig; then \
623 chmod 664 $(DIST_ARCHIVES).sig; \
625 @echo "Uploading to savannah"
626 scp -p $(DIST_ARCHIVES)* $(SAVANNAH_USERNAME)@savannah.gnu.org:/releases/nmh