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