]> diplodocus.org Git - nmh/blob - Makefile.am
In expand_pseudoheader(), set Content-Type to 7-bit for ASCII text.
[nmh] / Makefile.am
1 ##
2 ## Our Makefile.am template for Makefile.in (and, eventually, Makefile)
3 ##
4 ## Process this with automake to generate Makefile.in
5 ##
6
7 ## We set this to get our autoconf macros in the m4 directory
8 ACLOCAL_AMFLAGS = -I m4
9
10 ##
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.
16 ##
17 LDADD = sbr/libmh.a
18
19 ##
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
23 ##
24 MHNSEARCHPATH = "$(PATH)"
25 MHNSEARCHPROG = $(srcdir)/etc/mhn.find.sh
26
27 ##
28 ## Install config files and back-end programs in our own subdirecctories.
29 ##
30 nmhetcdir = @sysconfdir@/nmh
31 nmhlibexecdir = @libexecdir@/nmh
32
33 ##
34 ## nmh _does_ have a test suite!
35 ##
36 TESTS_ENVIRONMENT = MH_OBJ_DIR="@abs_builddir@" \
37 MH_TEST_DIR="@abs_builddir@/test/testdir" \
38 nmhlibexecdir="$(nmhlibexecdir)" bindir="$(bindir)" \
39 mandir="$(mandir)" nmhetcdir="$(nmhetcdir)" \
40 supported_locks="$(supported_locks)" \
41 default_locking="${default_locking}" \
42 MULTIBYTE_ENABLED=$(MULTIBYTE_ENABLED) \
43 ICONV_ENABLED=$(ICONV_ENABLED) \
44 $(TESTS_SHELL) ## Keep at end of TESTS_ENVIRONMENT.
45 ##
46 ## Important note: the "cleanup" test should always be last
47 ##
48 TESTS = test/ali/test-ali test/anno/test-anno \
49 test/bad-input/test-header \
50 test/burst/test-burst test/burst/test-burst-mime \
51 test/comp/test-comp-format test/dist/test-dist \
52 test/folder/test-create test/folder/test-packf \
53 test/folder/test-recurse test/folder/test-sortm \
54 test/folder/test-total \
55 test/format/test-curses test/format/test-dp \
56 test/format/test-fmtdump test/format/test-functions \
57 test/format/test-localmbox test/format/test-myname \
58 test/format/test-myhost test/format/test-mymbox \
59 test/format/test-nullstr \
60 test/format/test-rightjustify \
61 test/format/test-unquote \
62 test/forw/test-forw-digest test/forw/test-forw-format \
63 test/inc/test-deb359167 test/inc/test-eom-align \
64 test/inc/test-inc-scanout test/inc/test-msgchk \
65 test/inc/test-pop \
66 test/install-mh/test-install-mh \
67 test/locking/test-datalocking test/locking/test-spoollocking \
68 test/manpages/test-manpages \
69 test/mhbuild/test-attach \
70 test/mhbuild/test-cte \
71 test/mhbuild/test-ext-params \
72 test/mhbuild/test-forw test/mhbuild/test-header-encode \
73 test/mhbuild/test-utf8-body \
74 test/mhfixmsg/test-mhfixmsg \
75 test/mhl/test-mhl-flags \
76 test/mhlist/test-mhlist test/mhlist/test-ext-params \
77 test/mhmail/test-mhmail \
78 test/mhparam/test-mhparam test/mhpath/test-mhpath \
79 test/mhshow/test-charset test/mhshow/test-textcharset \
80 test/mhshow/test-cte-binary test/mhshow/test-qp \
81 test/mhshow/test-subpart test/mhshow/test-msg-buffer-boundaries \
82 test/mhstore/test-mhstore test/mkstemp/test-mkstemp \
83 test/new/test-basic test/pick/test-pick test/pick/test-stderr \
84 test/post/test-post-aliases test/post/test-post-basic \
85 test/post/test-post-multiple test/post/test-post-bcc \
86 test/post/test-post-dcc test/post/test-post-fcc \
87 test/post/test-post-multifrom test/post/test-post-envelope \
88 test/post/test-post-group test/post/test-mts test/post/test-messageid \
89 test/post/test-sendfiles test/prompter/test-prompter \
90 test/rcv/test-rcvdist test/rcv/test-rcvpack test/rcv/test-rcvstore \
91 test/rcv/test-rcvtty test/refile/test-refile test/repl/test-convert \
92 test/repl/test-if-str test/repl/test-trailing-newline \
93 test/repl/test-multicomp test/repl/test-repl \
94 test/scan/test-scan test/scan/test-scan-multibyte \
95 test/sequences/test-flist test/sequences/test-mark \
96 test/sequences/test-out-of-range \
97 test/slocal/test-slocal \
98 test/whatnow/test-attach-detach test/whatnow/test-cd \
99 test/whatnow/test-ls test/whom/test-whom \
100 test/cleanup ## The "cleanup" test should always be last.
101
102 check_SCRIPTS = test/common.sh
103 check_PROGRAMS = test/getfullname test/getcanon test/fakepop test/fakesmtp \
104 test/getcwidth
105 DISTCHECK_CONFIGURE_FLAGS = DISABLE_SETGID_MAIL=1
106
107 ##
108 ## Stuff that should be cleaned via "make clean"
109 ## automake 1.12.6 on FreeBSD 9 needs the sbr/dtimep.c.
110 ##
111 CLEANFILES = config/version.c sbr/sigmsg.h sbr/dtimep.c etc/mts.conf \
112 etc/gen-ctype-checked sbr/ctype-checked.[hc] \
113 etc/mhn.defaults man/man.sed man/mh-chart.man $(man_MANS) \
114 *.plist
115 clean-local:
116 @rm -rf RPM a.out.dSYM uip/a.out.dSYM
117 @rm -rf test/testdir
118
119 ##
120 ## Stuff that should be cleaned via "make maintainer-clean"
121 ##
122 MAINTAINERCLEANFILES = atags cscope.files cscope.out cscope.in.out cscope.po.out *.plist
123
124 ##
125 ## And our own superclean, to get everything left by maintainer-clean.
126 ##
127 SUPERCLEANFILES = ChangeLog Makefile.in aclocal.m4 compile config.guess \
128 config.h.in config.h.in~ config.sub configure depcomp \
129 install-sh missing ylwrap nmh-*.tar.gz nmh-*.tar.gz.sig
130 superclean: maintainer-clean
131 @rm -f $(SUPERCLEANFILES)
132 .PHONY: superclean
133
134 ##
135 ## Files that need to be built before everything else
136 ##
137 BUILT_SOURCES = sbr/sigmsg.h sbr/ctype-checked.c
138
139 ##
140 ## This is a list of all programs that get installed in the "bin" directory
141 ## Note that primary difference between "PROGRAMS" and "SCRIPTS" is that
142 ## the latter do not have $(EXEEXT) added on the end.
143 ##
144 bin_PROGRAMS = uip/ali uip/anno uip/burst uip/comp uip/dist uip/flist \
145 uip/fmttest uip/folder uip/forw uip/inc uip/install-mh \
146 uip/mark uip/mhbuild uip/mhfixmsg uip/mhlist uip/mhn \
147 uip/mhparam uip/mhpath uip/mhshow uip/mhstore uip/msgchk \
148 uip/new uip/packf uip/pick uip/prompter uip/refile \
149 uip/repl uip/rmf uip/rmm uip/scan uip/send uip/show uip/sortm \
150 uip/whatnow uip/whom
151
152 bin_SCRIPTS = uip/mhmail etc/sendfiles
153
154 ##
155 ## This is all programs that get installed in the "libexec/nmh" directory
156 ##
157 nmhlibexec_PROGRAMS = uip/ap uip/dp uip/fmtdump uip/mhl uip/mkstemp \
158 uip/post uip/rcvdist uip/rcvpack uip/rcvstore uip/rcvtty \
159 uip/slocal uip/viamail
160
161 nmhlibexec_SCRIPTS = uip/spost
162
163 ##
164 ## Programs that MAY need to get built at some point; we need to list them
165 ## here if they don't appear in any other primary so Automake knows about
166 ## them and can properly record dependency information.
167 ##
168 EXTRA_PROGRAMS = etc/gen-ctype-checked
169
170 ##
171 ## Internal libraries that we create as part of the build process
172 ## but do not install
173 ##
174 noinst_LIBRARIES = sbr/libmh.a mts/libmts.a
175
176 ##
177 ## These are all of our header files. Right now we don't install any of
178 ## them, but that might change in the future.
179 ##
180 noinst_HEADERS = h/addrsbr.h h/aliasbr.h h/crawl_folders.h h/dropsbr.h \
181 h/fmt_compile.h h/fmt_scan.h h/md5.h h/mf.h \
182 h/mh.h h/mhcachesbr.h h/mhparse.h h/mime.h \
183 h/mts.h h/nmh.h h/picksbr.h h/popsbr.h h/prototypes.h \
184 h/rcvmail.h h/scansbr.h h/signals.h h/tws.h h/utils.h \
185 mts/smtp/smtp.h sbr/ctype-checked.h
186
187 ##
188 ## Extra files we need to install in various places
189 ##
190 dist_nmhetc_DATA = etc/MailAliases etc/components etc/digestcomps \
191 etc/distcomps etc/forwcomps etc/mhl.body etc/mhl.digest \
192 etc/mhl.format etc/mhl.forward etc/mhl.headers \
193 etc/mhl.reply etc/mhl.replywithoutbody \
194 etc/mhshow.marker etc/rcvdistcomps etc/rcvdistcomps.outbox \
195 etc/replcomps etc/replgroupcomps \
196 etc/scan.MMDDYY \
197 etc/scan.YYYYMMDD etc/scan.curses etc/scan.default \
198 etc/scan.highlighted \
199 etc/scan.mailx etc/scan.nomime etc/scan.size etc/scan.time \
200 etc/scan.timely etc/scan.unseen
201
202 ##
203 ## The same as above, but we don't include these in the distribution
204 ## (because they're generated at compile time)
205 ##
206 nmhetc_DATA = etc/mhn.defaults etc/mts.conf
207
208 ##
209 ## Documentation that gets installed in docdir
210 ##
211 dist_doc_DATA = COPYRIGHT INSTALL NEWS README VERSION \
212 docs/COMPLETION-BASH docs/COMPLETION-TCSH \
213 docs/COMPLETION-ZSH docs/DIFFERENCES docs/FAQ \
214 docs/MAIL.FILTERING docs/MAILING-LISTS docs/README-ATTACHMENTS \
215 docs/README-HOOKS docs/README-components docs/README.about \
216 docs/README.SASL docs/README.developers docs/README.manpages \
217 docs/README-iCalendar docs/TODO
218
219 ##
220 ## Contribs that get installed in docdir/contrib/
221 ##
222 contribdir = $(docdir)/contrib
223 dist_contrib_SCRIPTS = docs/contrib/replyfilter docs/contrib/build_nmh \
224 docs/contrib/ml docs/contrib/vpick
225 dist_contrib_DATA = docs/contrib/replaliases
226
227 ##
228 ## Our man pages
229 ##
230 man_MANS = man/ali.1 man/anno.1 man/ap.8 man/burst.1 man/comp.1 \
231 man/dist.1 man/dp.8 man/flist.1 man/flists.1 \
232 man/fmtdump.8 man/fmttest.1 man/fnext.1 man/folder.1 man/folders.1 \
233 man/forw.1 man/fprev.1 man/inc.1 man/install-mh.1 man/mark.1 \
234 man/mh-alias.5 man/mh-chart.7 man/mh-draft.5 man/mh-folders.5 \
235 man/mh-format.5 man/mh-mail.5 man/mh-mime.7 man/mh-profile.5 \
236 man/mh_profile.5 man/mh-sequence.5 man/mh-tailor.5 man/mhbuild.1 \
237 man/mhfixmsg.1 man/mhl.1 man/mhlist.1 man/mhmail.1 man/mhn.1 \
238 man/mhparam.1 man/mhpath.1 man/mhshow.1 man/mhstore.1 \
239 man/mh-mkstemp.1 man/msgchk.1 man/mts.conf.5 man/new.1 \
240 man/next.1 man/nmh.7 man/packf.1 man/pick.1 man/post.8 man/prev.1 \
241 man/prompter.1 man/rcvdist.1 man/rcvpack.1 man/rcvstore.1 \
242 man/rcvtty.1 man/refile.1 man/repl.1 man/rmf.1 man/rmm.1 \
243 man/scan.1 man/send.1 man/sendfiles.1 man/show.1 man/slocal.1 \
244 man/sortm.1 man/unseen.1 man/whatnow.1 man/whom.1
245
246 ##
247 ## Sources for our man pages
248 ##
249 man_SRCS = man/ali.man man/anno.man man/ap.man man/burst.man man/comp.man \
250 man/dist.man man/dp.man man/flist.man \
251 man/flists.man man/fmtdump.man man/fmttest.man man/fnext.man \
252 man/folder.man man/folders.man man/forw.man man/fprev.man \
253 man/inc.man man/install-mh.man man/mark.man man/mh-alias.man \
254 man/mh-chart-gen.sh man/mh-draft.man man/mh-folders.man \
255 man/mh-format.man man/mh-mail.man man/mh-mime.man \
256 man/mh-profile.man man/mh_profile.man man/mh-sequence.man \
257 man/mh-tailor.man man/mhbuild.man man/mhfixmsg.man man/mhl.man \
258 man/mhlist.man man/mhmail.man man/mhn.man man/mhparam.man \
259 man/mhpath.man man/mhshow.man man/mhstore.man man/mh-mkstemp.man \
260 man/msgchk.man man/mts.conf.man man/new.man \
261 man/next.man man/nmh.man man/packf.man man/pick.man man/post.man \
262 man/prev.man man/prompter.man man/rcvdist.man man/rcvpack.man \
263 man/rcvstore.man man/rcvtty.man man/refile.man man/repl.man \
264 man/rmf.man man/rmm.man man/scan.man man/send.man \
265 man/sendfiles.man man/show.man man/slocal.man man/sortm.man \
266 man/unseen.man man/whatnow.man man/whom.man
267
268 ##
269 ## Files we need to include in the distribution which aren't found by
270 ## Automake using the automatic rules
271 ##
272 EXTRA_DIST = autogen.sh config/version.sh sbr/sigmsg.awk etc/mts.conf.in \
273 etc/mhn.defaults.sh etc/sendfiles $(MHNSEARCHPROG) DATE MACHINES \
274 docs/ChangeLog_MH-3_to_MH-6.6 \
275 docs/ChangeLog_MH-6.7.0_to_MH-6.8.4.html \
276 test/README test/fakesendmail $(TESTS) test/inc/deb359167.mbox \
277 test/inc/fromline.txt test/inc/msgheader.txt test/inc/filler.txt \
278 test/inc/md5sums test/mhmail/attachment.txt \
279 test/mhbuild/tiny.jpg \
280 test/mhbuild/somebinary \
281 test/mhbuild/nulls \
282 test/mhbuild/textplain \
283 test/post/test-post-common.sh test/valgrind.supp uip/mhmail \
284 SPECS/nmh.spec SPECS/build-nmh-cygwin $(man_SRCS)
285
286 ##
287 ## These are all of the definitions for each of the programs listed above.
288 ## They describe the source files that make up the programs and any particular
289 ## overrides that are used to select different library options from the
290 ## default.
291 ##
292 POSTLINK = @POSTLINK@
293
294 uip_ali_SOURCES = uip/ali.c uip/aliasbr.c
295 uip_ali_LDADD = $(LDADD) $(POSTLINK)
296
297 uip_anno_SOURCES = uip/anno.c uip/annosbr.c
298 uip_anno_LDADD = $(LDADD) $(POSTLINK)
299
300 uip_burst_SOURCES = uip/burst.c uip/mhparse.c uip/mhmisc.c uip/mhfree.c \
301 uip/mhcachesbr.c uip/md5.c
302 uip_burst_LDADD = $(LDADD) $(ICONVLIB) $(POSTLINK)
303
304 uip_comp_SOURCES = uip/comp.c uip/whatnowproc.c uip/whatnowsbr.c uip/sendsbr.c \
305 uip/annosbr.c uip/distsbr.c
306 uip_comp_LDADD = $(LDADD) $(READLINELIB) $(TERMLIB) $(ICONVLIB) $(POSTLINK)
307
308 uip_dist_SOURCES = uip/dist.c uip/whatnowproc.c uip/whatnowsbr.c uip/sendsbr.c \
309 uip/annosbr.c uip/distsbr.c uip/forwsbr.c
310 uip_dist_LDADD = $(LDADD) $(READLINELIB) $(TERMLIB) $(ICONVLIB) $(POSTLINK)
311
312 uip_flist_SOURCES = uip/flist.c
313 uip_flist_LDADD = $(LDADD) $(POSTLINK)
314
315 uip_folder_SOURCES = uip/folder.c
316 uip_folder_LDADD = $(LDADD) $(POSTLINK)
317
318 uip_forw_SOURCES = uip/forw.c uip/whatnowproc.c uip/whatnowsbr.c uip/sendsbr.c \
319 uip/annosbr.c uip/distsbr.c uip/forwsbr.c
320 uip_forw_LDADD = $(LDADD) $(READLINELIB) $(TERMLIB) $(ICONVLIB) $(POSTLINK)
321
322 uip_inc_SOURCES = uip/inc.c uip/scansbr.c uip/dropsbr.c uip/popsbr.c
323 uip_inc_LDADD = $(LDADD) $(TERMLIB) $(ICONVLIB) $(SASLLIB) $(POSTLINK)
324
325 uip_install_mh_SOURCES = uip/install-mh.c
326 uip_install_mh_LDADD = $(LDADD) $(POSTLINK)
327
328 uip_mark_SOURCES = uip/mark.c
329 uip_mark_LDADD = $(LDADD) $(POSTLINK)
330
331 uip_mhbuild_SOURCES = uip/mhbuild.c uip/mhbuildsbr.c uip/mhcachesbr.c \
332 uip/mhlistsbr.c uip/mhoutsbr.c uip/mhmisc.c \
333 uip/mhfree.c uip/mhparse.c uip/md5.c \
334 uip/mhstoresbr.c uip/mhshowsbr.c
335 uip_mhbuild_LDADD = $(LDADD) $(TERMLIB) $(ICONVLIB) $(POSTLINK)
336
337 uip_mhfixmsg_SOURCES = uip/mhfixmsg.c uip/mhparse.c uip/mhcachesbr.c \
338 uip/mhoutsbr.c uip/mhmisc.c uip/mhfree.c \
339 uip/mhshowsbr.c uip/mhlistsbr.c uip/md5.c
340 uip_mhfixmsg_LDADD = $(LDADD) $(TERMLIB) $(ICONVLIB) $(POSTLINK)
341
342 uip_mhlist_SOURCES = uip/mhlist.c uip/mhparse.c uip/mhcachesbr.c \
343 uip/mhlistsbr.c uip/mhmisc.c uip/mhfree.c uip/md5.c
344 uip_mhlist_LDADD = $(LDADD) $(TERMLIB) $(ICONVLIB) $(POSTLINK)
345
346 uip_mhn_SOURCES = uip/mhn.c uip/mhparse.c uip/mhcachesbr.c uip/mhshowsbr.c \
347 uip/mhlistsbr.c uip/mhstoresbr.c uip/mhmisc.c uip/mhfree.c \
348 uip/md5.c
349 uip_mhn_LDADD = $(LDADD) $(TERMLIB) $(ICONVLIB) $(POSTLINK)
350
351 uip_mhparam_SOURCES = uip/mhparam.c
352 uip_mhparam_LDADD = $(LDADD) $(POSTLINK)
353
354 uip_mhpath_SOURCES = uip/mhpath.c
355 uip_mhpath_LDADD = $(LDADD) $(POSTLINK)
356
357 uip_mhshow_SOURCES = uip/mhshow.c uip/mhparse.c uip/mhcachesbr.c \
358 uip/mhshowsbr.c uip/mhlistsbr.c uip/mhmisc.c \
359 uip/mhfree.c uip/md5.c
360 uip_mhshow_LDADD = $(LDADD) $(TERMLIB) $(ICONVLIB) $(POSTLINK)
361
362 uip_mhstore_SOURCES = uip/mhstore.c uip/mhparse.c uip/mhcachesbr.c \
363 uip/mhshowsbr.c uip/mhlistsbr.c uip/mhstoresbr.c \
364 uip/mhmisc.c uip/mhfree.c uip/md5.c
365 uip_mhstore_LDADD = $(LDADD) $(TERMLIB) $(ICONVLIB) $(POSTLINK)
366
367 uip_msgchk_SOURCES = uip/msgchk.c uip/popsbr.c
368 uip_msgchk_LDADD = $(LDADD) $(SASLLIB) $(POSTLINK)
369
370 uip_new_SOURCES = uip/new.c
371 uip_new_LDADD = $(LDADD) $(POSTLINK)
372
373 uip_packf_SOURCES = uip/packf.c uip/dropsbr.c
374 uip_packf_LDADD = $(LDADD) $(POSTLINK)
375
376 uip_pick_SOURCES = uip/pick.c uip/picksbr.c
377 uip_pick_LDADD = $(LDADD) $(ICONVLIB) $(POSTLINK)
378
379 uip_prompter_SOURCES = uip/prompter.c
380 uip_prompter_LDADD = $(LDADD) $(POSTLINK)
381
382 uip_refile_SOURCES = uip/refile.c
383 uip_refile_LDADD = $(LDADD) $(POSTLINK)
384
385 uip_repl_SOURCES = uip/repl.c uip/replsbr.c uip/whatnowproc.c uip/whatnowsbr.c \
386 uip/sendsbr.c uip/annosbr.c uip/distsbr.c
387 uip_repl_LDADD = $(LDADD) $(READLINELIB) $(TERMLIB) $(ICONVLIB) $(POSTLINK)
388
389 uip_rmf_SOURCES = uip/rmf.c
390 uip_rmf_LDADD = $(LDADD) $(POSTLINK)
391
392 uip_rmm_SOURCES = uip/rmm.c
393 uip_rmm_LDADD = $(LDADD) $(POSTLINK)
394
395 uip_scan_SOURCES = uip/scan.c uip/scansbr.c
396 uip_scan_LDADD = $(LDADD) $(TERMLIB) $(ICONVLIB) $(POSTLINK)
397
398 uip_send_SOURCES = uip/send.c uip/sendsbr.c uip/annosbr.c \
399 uip/distsbr.c
400 uip_send_LDADD = $(LDADD) $(POSTLINK)
401
402 uip_show_SOURCES = uip/show.c uip/mhlsbr.c
403 uip_show_LDADD = $(LDADD) $(TERMLIB) $(ICONVLIB) $(POSTLINK)
404
405 uip_sortm_SOURCES = uip/sortm.c
406 uip_sortm_LDADD = $(LDADD) $(POSTLINK)
407
408 uip_whatnow_SOURCES = uip/whatnow.c uip/whatnowsbr.c uip/sendsbr.c \
409 uip/annosbr.c uip/distsbr.c
410 uip_whatnow_LDADD = $(LDADD) $(READLINELIB) $(TERMLIB) $(POSTLINK)
411
412 uip_whom_SOURCES = uip/whom.c uip/distsbr.c
413 uip_whom_LDADD = $(LDADD) $(POSTLINK)
414
415 ##
416 ## Programs definitions for all utilities that end up in $(nmhlibexecdir)
417 ##
418
419 uip_ap_SOURCES = uip/ap.c
420 uip_ap_LDADD = $(LDADD) $(TERMLIB) $(ICONVLIB) $(POSTLINK)
421
422 uip_dp_SOURCES = uip/dp.c
423 uip_dp_LDADD = $(LDADD) $(TERMLIB) $(ICONVLIB) $(POSTLINK)
424
425 uip_fmtdump_SOURCES = uip/fmtdump.c
426 uip_fmtdump_LDADD = $(LDADD) $(TERMLIB) $(ICONVLIB) $(POSTLINK)
427
428 uip_fmttest_SOURCES = uip/fmttest.c
429 uip_fmttest_LDADD = $(LDADD) $(TERMLIB) $(ICONVLIB) $(POSTLINK)
430
431 uip_mhl_SOURCES = uip/mhl.c uip/mhlsbr.c
432 uip_mhl_LDADD = $(LDADD) $(TERMLIB) $(ICONVLIB) $(POSTLINK)
433
434 uip_mkstemp_SOURCES = uip/mkstemp.c
435 uip_mkstemp_LDADD = $(LDADD) $(POSTLINK)
436
437 uip_post_SOURCES = uip/post.c uip/aliasbr.c
438 uip_post_LDADD = mts/libmts.a $(LDADD) $(SASLLIB) $(TLSLIB) $(POSTLINK)
439
440 uip_rcvdist_SOURCES = uip/rcvdist.c uip/distsbr.c
441 uip_rcvdist_LDADD = $(LDADD) $(TERMLIB) $(ICONVLIB) $(POSTLINK)
442
443 uip_rcvpack_SOURCES = uip/rcvpack.c uip/dropsbr.c
444 uip_rcvpack_LDADD = $(LDADD) $(POSTLINK)
445
446 uip_rcvstore_SOURCES = uip/rcvstore.c
447 uip_rcvstore_LDADD = $(LDADD) $(POSTLINK)
448
449 uip_rcvtty_SOURCES = uip/rcvtty.c uip/scansbr.c
450 uip_rcvtty_LDADD = $(LDADD) $(TERMLIB) $(ICONVLIB) $(POSTLINK)
451
452 uip_slocal_SOURCES = uip/slocal.c uip/aliasbr.c uip/dropsbr.c
453 uip_slocal_LDADD = $(LDADD) $(NDBM_LIBS) $(POSTLINK)
454
455 uip_viamail_SOURCES = uip/viamail.c uip/mhmisc.c uip/sendsbr.c \
456 uip/annosbr.c uip/distsbr.c
457 uip_viamail_LDADD = $(LDADD) $(POSTLINK)
458
459 test_getfullname_SOURCES = test/getfullname.c
460 test_getfullname_LDADD = $(LDADD) $(POSTLINK)
461
462 test_getcanon_SOURCES = test/getcanon.c
463 test_getcanon_LDADD = $(POSTLINK)
464
465 test_fakepop_SOURCES = test/fakepop.c
466 test_fakepop_LDADD = $(POSTLINK)
467
468 test_fakesmtp_SOURCES = test/fakesmtp.c
469 test_fakesmtp_LDADD = $(POSTLINK)
470
471 test_getcwidth_SOURCES = test/getcwidth.c
472 test_getcwidth_LDADD = $(POSTLINK)
473
474 etc_gen_ctype_checked_SOURCES = etc/gen-ctype-checked.c
475 etc_gen_ctype_checked_LDADD = $(POSTLINK)
476
477 ##
478 ## Our rebuild rules for files that aren't built via the normal mechanisms
479 ##
480
481 ## Hard-code the config/version.c target, instead of using $@, so this
482 ## rule works for the distcheck target with Solaris (System V) make.
483 ## distcheck uses VPATH, causes that make to prepend the VPATH to $@.
484 config/version.c: Makefile $(srcdir)/config/version.sh
485 env srcdir="$(srcdir)" sh $(srcdir)/config/version.sh $(VERSION) > ./config/version.c
486
487 sbr/sigmsg.h: $(srcdir)/sbr/sigmsg.awk $(SIGNAL_H)
488 $(AWK) -f $(srcdir)/sbr/sigmsg.awk $(SIGNAL_H) > $@
489
490 sbr/ctype-checked.h: etc/gen-ctype-checked
491 etc/gen-ctype-checked
492
493 sbr/ctype-checked.c: etc/gen-ctype-checked sbr/ctype-checked.h
494
495 etc/mts.conf: $(srcdir)/etc/mts.conf.in Makefile
496 @rm -f $@
497 $(SED) -e 's,%mts%,$(MTS),' \
498 -e 's,%mailspool%,$(mailspool),' \
499 -e 's,%smtpservers%,$(smtpservers),' \
500 -e 's,%default_locking%,$(default_locking),' \
501 -e 's,%supported_locks%,$(supported_locks),' \
502 < $(srcdir)/etc/mts.conf.in > $@
503
504 etc/mhn.defaults: $(srcdir)/etc/mhn.defaults.sh $(MHNSEARCHPROG)
505 @rm -f $@
506 $(srcdir)/etc/mhn.defaults.sh $(MHNSEARCHPATH) $(MHNSEARCHPROG) > $@
507
508 ##
509 ## Use configure to set up default LN, but through a make variable so
510 ## that it can be overridden at install time.
511 ##
512 LN = @LN@
513
514 ##
515 ## This rule gets called at "make install" time; we use it to create links
516 ## between different programs.
517 ##
518 install-exec-hook:
519 @rm -f $(DESTDIR)$(bindir)/flists$(EXEEXT)
520 @rm -f $(DESTDIR)$(bindir)/folders$(EXEEXT)
521 @rm -f $(DESTDIR)$(bindir)/fnext$(EXEEXT)
522 @rm -f $(DESTDIR)$(bindir)/fprev$(EXEEXT)
523 @rm -f $(DESTDIR)$(bindir)/unseen$(EXEEXT)
524 @rm -f $(DESTDIR)$(bindir)/prev$(EXEEXT)
525 @rm -f $(DESTDIR)$(bindir)/next$(EXEEXT)
526 $(LN) $(DESTDIR)$(bindir)/flist$(EXEEXT) $(DESTDIR)$(bindir)/flists$(EXEEXT)
527 $(LN) $(DESTDIR)$(bindir)/folder$(EXEEXT) $(DESTDIR)$(bindir)/folders$(EXEEXT)
528 $(LN) $(DESTDIR)$(bindir)/new$(EXEEXT) $(DESTDIR)$(bindir)/fnext$(EXEEXT)
529 $(LN) $(DESTDIR)$(bindir)/new$(EXEEXT) $(DESTDIR)$(bindir)/fprev$(EXEEXT)
530 $(LN) $(DESTDIR)$(bindir)/new$(EXEEXT) $(DESTDIR)$(bindir)/unseen$(EXEEXT)
531 $(LN) $(DESTDIR)$(bindir)/show$(EXEEXT) $(DESTDIR)$(bindir)/prev$(EXEEXT)
532 $(LN) $(DESTDIR)$(bindir)/show$(EXEEXT) $(DESTDIR)$(bindir)/next$(EXEEXT)
533 if test x$(SETGID_MAIL) != x; then \
534 chgrp $(MAIL_SPOOL_GRP) $(DESTDIR)$(bindir)/inc$(EXEEXT) && \
535 chmod 2755 $(DESTDIR)$(bindir)/inc$(EXEEXT); \
536 fi
537
538 ##
539 ## Make sure we remove those links at uninstall time
540 ##
541 uninstall-hook:
542 rm -f $(DESTDIR)$(bindir)/flists$(EXEEXT)
543 rm -f $(DESTDIR)$(bindir)/folders$(EXEEXT)
544 rm -f $(DESTDIR)$(bindir)/fnext$(EXEEXT)
545 rm -f $(DESTDIR)$(bindir)/fprev$(EXEEXT)
546 rm -f $(DESTDIR)$(bindir)/unseen$(EXEEXT)
547 rm -f $(DESTDIR)$(bindir)/prev$(EXEEXT)
548 rm -f $(DESTDIR)$(bindir)/next$(EXEEXT)
549
550 ##
551 ## Our rules to build our internal libraries (libmh.a, libmts.a)
552 ##
553 sbr_libmh_a_SOURCES = sbr/addrsbr.c sbr/ambigsw.c sbr/atooi.c sbr/arglist.c \
554 sbr/base64.c sbr/brkstring.c \
555 sbr/charstring.c sbr/check_charset.c sbr/client.c \
556 sbr/closefds.c sbr/concat.c sbr/context_del.c \
557 sbr/context_find.c sbr/context_foil.c sbr/context_read.c \
558 sbr/context_replace.c sbr/context_save.c \
559 sbr/copy.c sbr/copyip.c sbr/cpydata.c \
560 sbr/cpydgst.c sbr/crawl_folders.c sbr/credentials.c \
561 sbr/discard.c sbr/done.c sbr/dtimep.l sbr/dtime.c \
562 sbr/encode_rfc2047.c \
563 sbr/escape_addresses.c \
564 sbr/error.c sbr/ext_hook.c sbr/fdcompare.c \
565 sbr/folder_addmsg.c sbr/folder_delmsgs.c \
566 sbr/folder_free.c sbr/folder_pack.c \
567 sbr/folder_read.c sbr/folder_realloc.c sbr/gans.c \
568 sbr/getans.c sbr/getanswer.c sbr/getarguments.c \
569 sbr/getcpy.c sbr/geteditor.c sbr/getfolder.c \
570 sbr/getpass.c \
571 sbr/fmt_addr.c sbr/fmt_compile.c sbr/fmt_new.c \
572 sbr/fmt_rfc2047.c sbr/fmt_scan.c sbr/lock_file.c \
573 sbr/m_atoi.c sbr/m_backup.c sbr/m_convert.c \
574 sbr/m_draft.c sbr/m_getfld.c sbr/m_gmprot.c \
575 sbr/m_maildir.c sbr/m_name.c sbr/m_popen.c sbr/m_rand.c \
576 sbr/makedir.c sbr/message_id.c sbr/mime_type.c sbr/mts.c \
577 sbr/norm_charmap.c sbr/path.c \
578 sbr/peekc.c sbr/pidwait.c sbr/pidstatus.c \
579 sbr/print_help.c sbr/print_sw.c sbr/print_version.c \
580 sbr/push.c sbr/putenv.c sbr/refile.c sbr/remdir.c \
581 sbr/r1bindex.c sbr/readconfig.c sbr/ruserpass.c \
582 sbr/seq_add.c sbr/seq_bits.c sbr/seq_del.c \
583 sbr/seq_getnum.c sbr/seq_list.c sbr/seq_nameok.c \
584 sbr/seq_print.c sbr/seq_read.c sbr/seq_save.c \
585 sbr/seq_setcur.c sbr/seq_setprev.c sbr/seq_setunseen.c \
586 sbr/showfile.c sbr/signals.c sbr/smatch.c \
587 sbr/snprintb.c sbr/ssequal.c \
588 sbr/strindex.c sbr/terminal.c \
589 sbr/trimcpy.c sbr/unquote.c \
590 sbr/uprf.c sbr/vfgets.c \
591 sbr/mf.c sbr/utils.c sbr/ctype-checked.c \
592 sbr/m_mktemp.c sbr/getansreadline.c sbr/vector.c \
593 config/config.c config/version.c
594
595 ##
596 ## Because these files use the definitions in the libmh rule below,
597 ## they need to be rebuilt if the Makefile changes.
598 ##
599
600 config/sbr_libmh_a-config.$(OBJEXT) sbr/sbr_libmh_a-mts.$(OBJEXT): Makefile
601
602 sbr_libmh_a_CPPFLAGS = -I./sbr -DNMHETCDIR='"$(nmhetcdir)"' \
603 -DMAILSPOOL='"$(mailspool)"' \
604 -DSENDMAILPATH='"$(sendmailpath)"' -DNMHBINDIR='"$(bindir)"' \
605 -DNMHLIBEXECDIR='"$(nmhlibexecdir)"'
606
607 mts_libmts_a_SOURCES = mts/smtp/smtp.c
608
609 ##
610 ## Our rules for generating man pages (both the rule for man.sed and
611 ## the implicit rules for man page generation).
612 ##
613 manext1 = 1
614 manext5 = 5
615 manext7 = 7
616 manext8 = 8
617
618 $(man_MANS): man/man.sed
619
620 man/man.sed: Makefile
621 @echo 's,%nmhwarning%,THIS FILE HAS BEEN AUTOMATICALLY GENERATED. DO NOT EDIT.,g' > $@
622 @echo 's,%nmhversion%,nmh-$(VERSION),g' >> $@
623 @echo 's,%nmhetcdir%,$(nmhetcdir),g' >> $@
624 @echo 's,%nmhlibexecdir%,$(nmhlibexecdir),g' >> $@
625 @echo 's,%bindir%,$(bindir),g' >> $@
626 @echo 's,%docdir%,$(docdir),g' >> $@
627 @echo 's,%mandir%,$(mandir),g' >> $@
628 @echo 's,%mailspool%,$(mailspool),g' >> $@
629 @echo 's,%sendmailpath%,$(sendmailpath),g' >> $@
630 @echo 's,%default_locking%,$(default_locking),g' >> $@
631 @echo 's,%supported_locks%,$(supported_locks),g' >> $@
632 @echo 's,%manext1%,$(manext1),g' >> $@
633 @echo 's,%manext5%,$(manext5),g' >> $@
634 @echo 's,%manext7%,$(manext7),g' >> $@
635 @echo 's,%manext8%,$(manext8),g' >> $@
636 @echo '/%mhl_forward%/r $(top_srcdir)/etc/mhl.forward' >> $@
637 @echo ' s,%mhl_forward%,,g' >> $@
638 @echo '/%mhl_format%/r $(top_srcdir)/etc/mhl.format' >> $@
639 @echo ' s,%mhl_format%,,g' >> $@
640 @echo '/%mhl_reply%/r $(top_srcdir)/etc/mhl.reply' >> $@
641 @echo ' s,%mhl_reply%,,g' >> $@
642
643 man/mh-chart.man: $(man_SRCS)
644 $(srcdir)/man/mh-chart-gen.sh > $@
645
646 .man.$(manext1):
647 $(SED) -f man/man.sed $< > $@
648
649 .man.$(manext5):
650 $(SED) -f man/man.sed $< > $@
651
652 .man.$(manext7):
653 $(SED) -f man/man.sed $< > $@
654
655 .man.$(manext8):
656 $(SED) -f man/man.sed $< > $@
657
658 man: $(man_MANS)
659
660 cleanman:
661 rm -f $(man_MANS)
662
663 .PHONY: man cleanman
664
665 ## Don't include commit hashes in ChangeLog.
666 ChangeLog:
667 @[ -d $(srcdir)/.git ] && (cd $(srcdir); git --no-pager log --abbrev-commit | \
668 egrep -v '^commit [0-9a-f]+$$' > $@) || true
669 ## Make ChangeLog phony so it will always get regenerated. But don't
670 ## fail if we don't have a git repository in order to allow
671 ## regeneration of distribution archive or RPM.
672 .PHONY: ChangeLog
673
674 ##
675 ## Our RPM build target
676 ##
677 rpm: dist
678 @test -d $(rpmdir)/SOURCES || $(MKDIR_P) $(rpmdir)/SOURCES
679 @mv -f $(DIST_ARCHIVES) $(rpmdir)/SOURCES
680 @cp -p VERSION $(rpmdir)/SOURCES
681 @rpmbuild --define '_topdir $(rpmdir)' \
682 --define '_tmppath %{_topdir}/TMP' \
683 --define "_sysconfdir $(DESTDIR)$(sysconfdir)" \
684 -ba SPECS/nmh.spec
685 .PHONY: rpm
686
687
688 ##
689 ## Use GNU gcov to find the coverage of the test suite.
690 ## These targets are not integrated into the other automake
691 ## targets because they will be used so infrequently, if at all.
692 ##
693 gcov:
694 @if ./config.status --config | grep -e --enable-debug >/dev/null; then \
695 echo For best results with gcov, configure without --enable-debug; \
696 fi
697 @echo rebuilding with AM_CFLAGS=--coverage . . .
698 @(make clean && make AM_CFLAGS=--coverage) > /dev/null && \
699 make check AM_CFLAGS=--coverage
700 @for i in `find . -name '*.gcda'`; do \
701 gcov -p -o `echo $$i | $(SED) 's%\\(.*\\)/%\\1 %'`; \
702 done
703 @for i in `find . -name '*.gcno'`; do \
704 if test -f `echo $$i | sed 's%\.gcno%.gcda%'`; then :; else \
705 echo untested: $$i; \
706 fi; \
707 done
708 gcov-mostlyclean:
709 @find . -name '*.gcno' -o -name '*.gcda' | xargs rm
710 gcov-clean: gcov-mostlyclean
711 @find . -name '*.gcov' | xargs rm
712 .PHONY: gcov gcov-mostlyclean gcov-clean
713
714
715 ##
716 ## Rules to upload the distribution to savannah
717 ##
718 upload: dist
719 @if test -z "$(SAVANNAH_USERNAME)"; then \
720 echo "You need to set SAVANNAH_USERNAME to the your username on savannah.gnu.org." ;\
721 echo "You can set it either in your environment or on the make command line."; \
722 false; \
723 fi
724 @echo "Did you run 'make distcheck' already?"
725 @if test -z "$(SKIP_GPG_SIG)"; then \
726 echo "Creating GPG signature (set SKIP_GPG_SIG to bypass this step)"; \
727 gpg --output $(DIST_ARCHIVES).sig --detach-sig $(DIST_ARCHIVES); \
728 fi
729 @echo "Setting permissions for savannah.gnu.org"
730 chmod 664 $(DIST_ARCHIVES)
731 if test -f $(DIST_ARCHIVES).sig; then \
732 chmod 664 $(DIST_ARCHIVES).sig; \
733 fi
734 @echo "Uploading to savannah"
735 scp -p $(DIST_ARCHIVES)* $(SAVANNAH_USERNAME)@dl.sv.nongnu.org:/releases/nmh
736 .PHONY: upload