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