]> diplodocus.org Git - nmh/blob - Makefile.am
e553295d67e879641b33a7a547787e76387ea343
[nmh] / Makefile.am
1 ## Our Makefile.am template for Makefile.in (and, eventually, Makefile)
2 ##
3 ## Process this with automake to generate Makefile.in
4 ## Lists are in `LC_ALL=C sort' order.
5 ##
6
7 ## We set this to get our autoconf macros in the m4 directory
8 ACLOCAL_AMFLAGS = -I m4
9
10 AM_YFLAGS = -d
11
12 ##
13 ## This is the default set of libraries all programs link against. Some
14 ## programs add extra libraries to this set, so they override this with
15 ## a program-specific LDADD variable. Note that in all of the cases today
16 ## LDADD is included in the program-specific LDADD since we want to add
17 ## to this list of libraries, not replace it.
18 ##
19 LDADD = sbr/libmh.a
20
21 ##
22 ## These are used to create the default mhn.defaults config file
23 ## MHNSEARCHPATH is the default path to look for MIME content handlers
24 ## MHNSEARCHPROG is the script used to find the support programs
25 ##
26 MHNSEARCHPATH = "$(PATH)"
27 MHNSEARCHPROG = $(srcdir)/etc/mhn.find.sh
28
29 ##
30 ## nmh _does_ have a test suite!
31 ##
32 TESTS_ENVIRONMENT = MH_OBJ_DIR="@abs_builddir@" \
33 MH_VERSION="$(VERSION)" \
34 OAUTH_SUPPORT='@OAUTH_SUPPORT@' \
35 CURL_USER_AGENT='@CURL_USER_AGENT@' \
36 MH_TEST_DIR=`cd "@abs_builddir@" && pwd -P`/test/testdir \
37 nmhlibexecdir="$(nmhlibexecdir)" bindir="$(bindir)" \
38 mandir="$(mandir)" nmhetcdir="$(nmhetcdir)" \
39 nmhetcdirinst="@nmhetcdirinst@$(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 ##
47 ## Important note: the "cleanup" test should always be last
48 ##
49 TESTS = \
50 test/ali/test-ali \
51 test/anno/test-anno \
52 test/bad-input/test-header \
53 test/burst/test-burst \
54 test/burst/test-burst-mime \
55 test/comp/test-comp-format \
56 test/dist/test-dist \
57 test/folder/test-coverage \
58 test/folder/test-create \
59 test/folder/test-nocreate \
60 test/folder/test-packf \
61 test/folder/test-recurse \
62 test/folder/test-sortm \
63 test/folder/test-total \
64 test/format/test-ap \
65 test/format/test-curses \
66 test/format/test-dp \
67 test/format/test-fmtdump \
68 test/format/test-fmttest \
69 test/format/test-functions \
70 test/format/test-localmbox \
71 test/format/test-myhost \
72 test/format/test-mymbox \
73 test/format/test-myname \
74 test/format/test-nullstr \
75 test/format/test-rightjustify \
76 test/format/test-unquote \
77 test/forw/test-forw-coverage \
78 test/forw/test-forw-digest \
79 test/forw/test-forw-format \
80 test/inc/test-deb359167 \
81 test/inc/test-eom-align \
82 test/inc/test-inc-scanout \
83 test/inc/test-msgchk \
84 test/inc/test-pop \
85 test/install-mh/test-install-mh \
86 test/install-mh/test-version-check \
87 test/locking/test-datalocking \
88 test/locking/test-spoollocking \
89 test/manpages/test-manpages \
90 test/mhbuild/test-attach \
91 test/mhbuild/test-cte \
92 test/mhbuild/test-ext-params \
93 test/mhbuild/test-forw \
94 test/mhbuild/test-header-encode \
95 test/mhbuild/test-mhbuild \
96 test/mhbuild/test-utf8-body \
97 test/mhfixmsg/test-mhfixmsg \
98 test/mhical/test-mhical \
99 test/mhl/test-mhl-flags \
100 test/mhl/test-rfc6532 \
101 test/mhlist/test-ext-params \
102 test/mhlist/test-mhlist \
103 test/mhmail/test-mhmail \
104 test/mhparam/test-mhparam \
105 test/mhpath/test-mhpath \
106 test/mhshow/test-binary \
107 test/mhshow/test-charset \
108 test/mhshow/test-cte-binary \
109 test/mhshow/test-exec \
110 test/mhshow/test-markers \
111 test/mhshow/test-msg-buffer-boundaries \
112 test/mhshow/test-qp \
113 test/mhshow/test-subpart \
114 test/mhshow/test-textcharset \
115 test/mhstore/test-mhstore \
116 test/mkstemp/test-mkstemp \
117 test/new/test-basic \
118 test/oauth/test-inc \
119 test/oauth/test-mhlogin \
120 test/oauth/test-mhparam \
121 test/oauth/test-send \
122 test/oauth/test-sendfrom \
123 test/oauth/test-share \
124 test/pick/test-pick \
125 test/pick/test-stderr \
126 test/post/test-messageid \
127 test/post/test-mts \
128 test/post/test-post-aliases \
129 test/post/test-post-basic \
130 test/post/test-post-bcc \
131 test/post/test-post-dcc \
132 test/post/test-post-envelope \
133 test/post/test-post-fcc \
134 test/post/test-post-group \
135 test/post/test-post-multifrom \
136 test/post/test-post-multiple \
137 test/post/test-rfc6531 \
138 test/post/test-sendfiles \
139 test/prompter/test-prompter \
140 test/rcv/test-rcvdist \
141 test/rcv/test-rcvpack \
142 test/rcv/test-rcvstore \
143 test/rcv/test-rcvtty \
144 test/refile/test-refile \
145 test/repl/test-convert \
146 test/repl/test-if-str \
147 test/repl/test-multicomp \
148 test/repl/test-repl \
149 test/repl/test-trailing-newline \
150 test/scan/test-header-parsing \
151 test/scan/test-scan \
152 test/scan/test-scan-multibyte \
153 test/send/test-sendfrom \
154 test/sequences/test-flist \
155 test/sequences/test-mark \
156 test/sequences/test-out-of-range \
157 test/show/test-show \
158 test/slocal/test-slocal \
159 test/whatnow/test-attach-detach \
160 test/whatnow/test-cd \
161 test/whatnow/test-ls \
162 test/whom/test-whom \
163 test/cleanup ## The "cleanup" test should always be last.
164
165 check_SCRIPTS = test/common.sh
166
167 check_PROGRAMS = \
168 test/fakehttp \
169 test/fakepop \
170 test/fakesmtp \
171 test/getcanon \
172 test/getcwidth \
173 test/getfullname \
174 test/runpty \
175 #
176
177 ## So they can be built without builing the `check' target.
178 check-programs: $(check_PROGRAMS)
179
180 ## The location of installed nmhetcdir is, for all purposes except
181 ## distcheck, $nmhetcdir. For distcheck, prepend $MH_INST_DIR (from
182 ## test/common.sh.in), which is based on $MH_TEST_DIR (from
183 ## $TESTS_ENVIRONMENT).
184 AM_DISTCHECK_CONFIGURE_FLAGS = DISABLE_SETGID_MAIL=1 \
185 NMHETCDIRINST='$${abs_builddir}/test/testdir/inst'
186
187 ##
188 ## Stuff that should be cleaned via "make clean"
189 ##
190 CLEANFILES = \
191 $(man_MANS) \
192 *.plist \
193 config/version.c \
194 etc/bash_completion_nmh \
195 etc/mhn.defaults \
196 etc/mts.conf \
197 man/man.sed \
198 man/mh-chart.man
199 #
200
201 clean-local:
202 @rm -rf RPM a.out.dSYM uip/a.out.dSYM
203 @rm -rf test/testdir
204
205 ##
206 ## Stuff that should be cleaned via "make maintainer-clean"
207 ##
208 MAINTAINERCLEANFILES = \
209 *.plist \
210 atags \
211 cscope.files \
212 cscope.in.out \
213 cscope.out \
214 cscope.po.out \
215 #
216
217 ##
218 ## And our own superclean, to get everything left by maintainer-clean.
219 ##
220 SUPERCLEANFILES = \
221 ChangeLog \
222 Makefile.in \
223 aclocal.m4 \
224 compile \
225 config.guess \
226 config.h.in \
227 config.h.in~ \
228 config.sub \
229 configure \
230 depcomp \
231 install-sh \
232 missing \
233 nmh-*.tar.gz \
234 nmh-*.tar.gz.sig \
235 test-driver \
236 ylwrap \
237 #
238
239 superclean: maintainer-clean
240 @rm -f $(SUPERCLEANFILES)
241 .PHONY: superclean
242
243 ##
244 ## This is a list of all programs that get installed in the "bin" directory
245 ## Note that primary difference between "PROGRAMS" and "SCRIPTS" is that
246 ## the latter do not have $(EXEEXT) added on the end.
247 ##
248 bin_PROGRAMS = \
249 uip/ali \
250 uip/anno \
251 uip/burst \
252 uip/comp \
253 uip/dist \
254 uip/flist \
255 uip/fmttest \
256 uip/folder \
257 uip/forw \
258 uip/inc \
259 uip/install-mh \
260 uip/mark \
261 uip/mhbuild \
262 uip/mhfixmsg \
263 uip/mhical \
264 uip/mhlist \
265 uip/mhlogin \
266 uip/mhn \
267 uip/mhparam \
268 uip/mhpath \
269 uip/mhshow \
270 uip/mhstore \
271 uip/msgchk \
272 uip/new \
273 uip/packf \
274 uip/pick \
275 uip/prompter \
276 uip/refile \
277 uip/repl \
278 uip/rmf \
279 uip/rmm \
280 uip/scan \
281 uip/send \
282 uip/show \
283 uip/sortm \
284 uip/whatnow \
285 uip/whom \
286 #
287
288 noinst_PROGRAMS = \
289 uip/imaptest \
290 #
291
292 bin_SCRIPTS = \
293 etc/sendfiles \
294 uip/mhmail \
295 #
296
297 ##
298 ## This is all programs that get installed in the "libexec/nmh" directory
299 ##
300 nmhlibexec_PROGRAMS = \
301 uip/ap \
302 uip/dp \
303 uip/fmtdump \
304 uip/mhl \
305 uip/mkstemp \
306 uip/post \
307 uip/rcvdist \
308 uip/rcvpack \
309 uip/rcvstore \
310 uip/rcvtty \
311 uip/slocal \
312 uip/viamail \
313 #
314
315 nmhlibexec_SCRIPTS = uip/spost
316
317 ##
318 ## Internal libraries that we create as part of the build process
319 ## but do not install
320 ##
321 noinst_LIBRARIES = \
322 mts/libmts.a \
323 sbr/libmh.a \
324 #
325
326 ##
327 ## These are all of our header files. Right now we don't install any of
328 ## them, but that might change in the future.
329 ##
330 noinst_HEADERS = \
331 h/addrsbr.h \
332 h/aliasbr.h \
333 h/done.h \
334 h/dropsbr.h \
335 h/fmt_compile.h \
336 h/fmt_scan.h \
337 h/icalendar.h \
338 h/mf.h \
339 h/mh.h \
340 h/mhparse.h \
341 h/mime.h \
342 h/mts.h \
343 h/netsec.h \
344 h/nmh.h \
345 h/oauth.h \
346 h/prototypes.h \
347 h/signals.h \
348 h/tws.h \
349 h/utils.h \
350 mts/smtp/smtp.h \
351 sbr/ambigsw.h \
352 sbr/arglist.h \
353 sbr/atooi.h \
354 sbr/base64.h \
355 sbr/brkstring.h \
356 sbr/check_charset.h \
357 sbr/client.h \
358 sbr/concat.h \
359 sbr/context_del.h \
360 sbr/context_find.h \
361 sbr/context_foil.h \
362 sbr/context_read.h \
363 sbr/context_replace.h \
364 sbr/context_save.h \
365 sbr/copyip.h \
366 sbr/cpydata.h \
367 sbr/cpydgst.h \
368 sbr/crawl_folders.h \
369 sbr/credentials.h \
370 sbr/ctype-checked.h \
371 sbr/datetime.h \
372 sbr/discard.h \
373 sbr/dtime.h \
374 sbr/encode_rfc2047.h \
375 sbr/error.h \
376 sbr/escape_addresses.h \
377 sbr/ext_hook.h \
378 sbr/fdcompare.h \
379 sbr/fmt_addr.h \
380 sbr/fmt_new.h \
381 sbr/fmt_rfc2047.h \
382 sbr/folder_addmsg.h \
383 sbr/folder_delmsgs.h \
384 sbr/folder_free.h \
385 sbr/folder_pack.h \
386 sbr/folder_read.h \
387 sbr/folder_realloc.h \
388 sbr/getarguments.h \
389 sbr/getcpy.h \
390 sbr/geteditor.h \
391 sbr/getfolder.h \
392 sbr/getpass.h \
393 sbr/lock_file.h \
394 sbr/m_atoi.h \
395 sbr/m_backup.h \
396 sbr/m_convert.h \
397 sbr/m_draft.h \
398 sbr/m_getfld.h \
399 sbr/m_gmprot.h \
400 sbr/m_maildir.h \
401 sbr/m_mktemp.h \
402 sbr/m_name.h \
403 sbr/m_popen.h \
404 sbr/m_rand.h \
405 sbr/makedir.h \
406 sbr/message_id.h \
407 sbr/mime_type.h \
408 sbr/path.h \
409 sbr/pidstatus.h \
410 sbr/print_help.h \
411 sbr/print_sw.h \
412 sbr/print_version.h \
413 sbr/push.h \
414 sbr/r1bindex.h \
415 sbr/read_line.h \
416 sbr/read_switch.h \
417 sbr/read_switch_multiword.h \
418 sbr/read_switch_multiword_via_readline.h \
419 sbr/read_yes_or_no_if_tty.h \
420 sbr/readconfig.h \
421 sbr/refile.h \
422 sbr/remdir.h \
423 sbr/ruserpass.h \
424 sbr/seq_add.h \
425 sbr/seq_bits.h \
426 sbr/seq_del.h \
427 sbr/seq_getnum.h \
428 sbr/seq_list.h \
429 sbr/seq_nameok.h \
430 sbr/seq_print.h \
431 sbr/seq_read.h \
432 sbr/seq_save.h \
433 sbr/seq_setcur.h \
434 sbr/seq_setprev.h \
435 sbr/seq_setunseen.h \
436 sbr/showfile.h \
437 sbr/smatch.h \
438 sbr/snprintb.h \
439 sbr/ssequal.h \
440 sbr/strindex.h \
441 sbr/terminal.h \
442 sbr/trimcpy.h \
443 sbr/unquote.h \
444 sbr/uprf.h \
445 sbr/vector.h \
446 sbr/vfgets.h \
447 thirdparty/jsmn/jsmn.h \
448 uip/annosbr.h \
449 uip/distsbr.h \
450 uip/forwsbr.h \
451 uip/mhfree.h \
452 uip/mhlsbr.h \
453 uip/mhmisc.h \
454 uip/mhoutsbr.h \
455 uip/mhshowsbr.h \
456 uip/picksbr.h \
457 uip/popsbr.h \
458 uip/replsbr.h \
459 uip/scansbr.h \
460 uip/sendsbr.h \
461 uip/whatnowproc.h \
462 uip/whatnowsbr.h \
463 #
464
465 ##
466 ## Extra files we need to install in various places
467 ##
468 dist_nmhetc_SCRIPTS = etc/rmmproc.messageid
469 dist_nmhetc_DATA = \
470 etc/MailAliases \
471 etc/components \
472 etc/digestcomps \
473 etc/distcomps \
474 etc/forwcomps \
475 etc/mhical.12hour \
476 etc/mhical.24hour \
477 etc/mhl.body \
478 etc/mhl.digest \
479 etc/mhl.format \
480 etc/mhl.forward \
481 etc/mhl.headers \
482 etc/mhl.reply \
483 etc/mhl.replywithoutbody \
484 etc/mhshow.marker \
485 etc/rcvdistcomps \
486 etc/rcvdistcomps.outbox \
487 etc/replcomps \
488 etc/replgroupcomps \
489 etc/scan.MMDDYY \
490 etc/scan.YYYYMMDD \
491 etc/scan.curses \
492 etc/scan.default \
493 etc/scan.highlighted \
494 etc/scan.mailx \
495 etc/scan.nomime \
496 etc/scan.size \
497 etc/scan.time \
498 etc/scan.timely \
499 etc/scan.unseen \
500 #
501
502 ##
503 ## The same as above, but we don't include these in the distribution
504 ## (because they're generated at compile time)
505 ##
506 nmhetc_DATA = \
507 etc/bash_completion_nmh \
508 etc/mhn.defaults \
509 etc/mts.conf \
510 #
511
512 ##
513 ## Documentation that gets installed in docdir
514 ##
515 dist_doc_DATA = \
516 COPYRIGHT \
517 INSTALL \
518 NEWS \
519 README \
520 VERSION \
521 docs/COMPLETION-TCSH \
522 docs/COMPLETION-ZSH \
523 docs/DIFFERENCES \
524 docs/FAQ \
525 docs/MAIL.FILTERING \
526 docs/MAILING-LISTS \
527 docs/README-ATTACHMENTS \
528 docs/README-HOOKS \
529 docs/README-components \
530 docs/README.SASL \
531 docs/README.about \
532 docs/README.developers \
533 docs/README.manpages \
534 docs/TODO \
535 #
536
537 ##
538 ## Contribs that get installed in docdir/contrib/
539 ##
540 docs_contribdir = $(docdir)/contrib
541 dist_docs_contrib_SCRIPTS = \
542 docs/contrib/localpostproc \
543 docs/contrib/ml \
544 docs/contrib/replyfilter \
545 docs/contrib/vpick \
546 #
547
548 dist_docs_contrib_DATA = docs/contrib/replaliases
549
550 ##
551 ## Our man pages
552 ##
553 man_MANS = \
554 man/MH.7 \
555 man/ali.1 \
556 man/anno.1 \
557 man/ap.8 \
558 man/burst.1 \
559 man/comp.1 \
560 man/dist.1 \
561 man/dp.8 \
562 man/flist.1 \
563 man/flists.1 \
564 man/fmtdump.8 \
565 man/fmttest.1 \
566 man/fnext.1 \
567 man/folder.1 \
568 man/folders.1 \
569 man/forw.1 \
570 man/fprev.1 \
571 man/inc.1 \
572 man/install-mh.1 \
573 man/mark.1 \
574 man/mh-alias.5 \
575 man/mh-chart.7 \
576 man/mh-draft.5 \
577 man/mh-folders.5 \
578 man/mh-format.5 \
579 man/mh-mail.5 \
580 man/mh-mime.7 \
581 man/mh-mkstemp.1 \
582 man/mh-profile.5 \
583 man/mh-sequence.5 \
584 man/mh-tailor.5 \
585 man/mh_profile.5 \
586 man/mhbuild.1 \
587 man/mhfixmsg.1 \
588 man/mhical.1 \
589 man/mhl.1 \
590 man/mhlist.1 \
591 man/mhlogin.1 \
592 man/mhmail.1 \
593 man/mhn.1 \
594 man/mhparam.1 \
595 man/mhpath.1 \
596 man/mhshow.1 \
597 man/mhstore.1 \
598 man/msgchk.1 \
599 man/mts.conf.5 \
600 man/new.1 \
601 man/next.1 \
602 man/nmh.7 \
603 man/packf.1 \
604 man/pick.1 \
605 man/post.8 \
606 man/prev.1 \
607 man/prompter.1 \
608 man/rcvdist.1 \
609 man/rcvpack.1 \
610 man/rcvstore.1 \
611 man/rcvtty.1 \
612 man/refile.1 \
613 man/repl.1 \
614 man/rmf.1 \
615 man/rmm.1 \
616 man/scan.1 \
617 man/send.1 \
618 man/sendfiles.1 \
619 man/show.1 \
620 man/slocal.1 \
621 man/sortm.1 \
622 man/unseen.1 \
623 man/whatnow.1 \
624 man/whom.1 \
625 #
626
627 ##
628 ## Sources for our man pages
629 ##
630 man_SRCS = \
631 man/MH.man \
632 man/ali.man \
633 man/anno.man \
634 man/ap.man \
635 man/burst.man \
636 man/comp.man \
637 man/dist.man \
638 man/dp.man \
639 man/flist.man \
640 man/flists.man \
641 man/fmtdump.man \
642 man/fmttest.man \
643 man/fnext.man \
644 man/folder.man \
645 man/folders.man \
646 man/forw.man \
647 man/fprev.man \
648 man/inc.man \
649 man/install-mh.man \
650 man/mark.man \
651 man/mh-alias.man \
652 man/mh-chart-gen.sh \
653 man/mh-draft.man \
654 man/mh-folders.man \
655 man/mh-format.man \
656 man/mh-mail.man \
657 man/mh-mime.man \
658 man/mh-mkstemp.man \
659 man/mh-profile.man \
660 man/mh-sequence.man \
661 man/mh-tailor.man \
662 man/mh_profile.man \
663 man/mhbuild.man \
664 man/mhfixmsg.man \
665 man/mhical.man \
666 man/mhl.man \
667 man/mhlist.man \
668 man/mhlogin.man \
669 man/mhmail.man \
670 man/mhn.man \
671 man/mhparam.man \
672 man/mhpath.man \
673 man/mhshow.man \
674 man/mhstore.man \
675 man/msgchk.man \
676 man/mts.conf.man \
677 man/new.man \
678 man/next.man \
679 man/nmh.man \
680 man/packf.man \
681 man/pick.man \
682 man/post.man \
683 man/prev.man \
684 man/prompter.man \
685 man/rcvdist.man \
686 man/rcvpack.man \
687 man/rcvstore.man \
688 man/rcvtty.man \
689 man/refile.man \
690 man/repl.man \
691 man/rmf.man \
692 man/rmm.man \
693 man/scan.man \
694 man/send.man \
695 man/sendfiles.man \
696 man/show.man \
697 man/slocal.man \
698 man/sortm.man \
699 man/unseen.man \
700 man/whatnow.man \
701 man/whom.man \
702 #
703
704 ##
705 ## Files we need to include in the distribution which aren't found by
706 ## Automake using the automatic rules
707 ##
708 EXTRA_DIST = \
709 $(MHNSEARCHPROG) \
710 $(TESTS) \
711 $(man_SRCS) \
712 DATE \
713 MACHINES \
714 SPECS/nmh.cygport \
715 SPECS/nmh.spec \
716 autogen.sh \
717 build_nmh \
718 config/version.sh \
719 docs/ChangeLog_MH-3_to_MH-6.6 \
720 docs/ChangeLog_MH-6.7.0_to_MH-6.8.4.html \
721 etc/bash_completion_nmh-gen \
722 etc/mhn.defaults.sh \
723 etc/mts.conf.in \
724 etc/sendfiles \
725 sbr/icalparse.h \
726 test/README \
727 test/fakesendmail \
728 test/inc/deb359167.mbox \
729 test/inc/filler.txt \
730 test/inc/fromline.txt \
731 test/inc/md5sums \
732 test/inc/msgheader.txt \
733 test/mhbuild/nulls \
734 test/mhbuild/somebinary \
735 test/mhbuild/textplain \
736 test/mhbuild/tiny.jpg \
737 test/mhmail/attachment.txt \
738 test/oauth/common.sh \
739 test/post/test-post-common.sh \
740 test/send/README \
741 test/valgrind.supp \
742 uip/mhmail \
743 #
744
745 ##
746 ## These are all of the definitions for each of the programs listed above.
747 ## They describe the source files that make up the programs and any particular
748 ## overrides that are used to select different library options from the
749 ## default.
750 ##
751 POSTLINK = @POSTLINK@
752
753 uip_ali_SOURCES = uip/ali.c uip/aliasbr.c
754 uip_ali_LDADD = $(LDADD) $(POSTLINK)
755
756 uip_anno_SOURCES = uip/anno.c uip/annosbr.c
757 uip_anno_LDADD = $(LDADD) $(POSTLINK)
758
759 uip_burst_SOURCES = uip/burst.c \
760 uip/mhparse.c \
761 uip/mhmisc.c \
762 uip/mhfree.c \
763 #
764 uip_burst_LDADD = $(LDADD) $(ICONVLIB) $(POSTLINK)
765
766 uip_comp_SOURCES = uip/comp.c uip/whatnowproc.c uip/whatnowsbr.c uip/sendsbr.c \
767 uip/annosbr.c uip/distsbr.c
768 uip_comp_LDADD = $(LDADD) $(READLINELIB) $(TERMLIB) $(ICONVLIB) $(POSTLINK)
769
770 uip_dist_SOURCES = uip/dist.c uip/whatnowproc.c uip/whatnowsbr.c uip/sendsbr.c \
771 uip/annosbr.c uip/distsbr.c uip/forwsbr.c
772 uip_dist_LDADD = $(LDADD) $(READLINELIB) $(TERMLIB) $(ICONVLIB) $(POSTLINK)
773
774 uip_flist_SOURCES = uip/flist.c
775 uip_flist_LDADD = $(LDADD) $(POSTLINK)
776
777 uip_folder_SOURCES = uip/folder.c
778 uip_folder_LDADD = $(LDADD) $(POSTLINK)
779
780 uip_forw_SOURCES = uip/forw.c uip/whatnowproc.c uip/whatnowsbr.c uip/sendsbr.c \
781 uip/annosbr.c uip/distsbr.c uip/forwsbr.c
782 uip_forw_LDADD = $(LDADD) $(READLINELIB) $(TERMLIB) $(ICONVLIB) $(POSTLINK)
783
784 uip_imaptest_SOURCES = uip/imaptest.c
785 uip_imaptest_LDADD = $(LDADD) $(SASLLIB) $(CURLLIB) $(TLSLIB) $(POSTLINK)
786
787 uip_inc_SOURCES = uip/inc.c uip/scansbr.c uip/dropsbr.c uip/popsbr.c
788 uip_inc_LDADD = $(LDADD) $(TERMLIB) $(ICONVLIB) $(SASLLIB) $(CURLLIB) \
789 $(TLSLIB) $(POSTLINK)
790
791 uip_install_mh_SOURCES = uip/install-mh.c
792 uip_install_mh_LDADD = $(LDADD) $(POSTLINK)
793
794 uip_mark_SOURCES = uip/mark.c
795 uip_mark_LDADD = $(LDADD) $(POSTLINK)
796
797 uip_mhbuild_SOURCES = uip/mhbuild.c \
798 uip/mhbuildsbr.c \
799 uip/mhlistsbr.c \
800 uip/mhoutsbr.c \
801 uip/mhmisc.c \
802 uip/mhfree.c \
803 uip/mhparse.c \
804 uip/mhstoresbr.c \
805 uip/mhshowsbr.c \
806 #
807 uip_mhbuild_LDADD = $(LDADD) $(TERMLIB) $(ICONVLIB) $(POSTLINK)
808
809 uip_mhfixmsg_SOURCES = uip/mhfixmsg.c \
810 uip/mhparse.c \
811 uip/mhoutsbr.c \
812 uip/mhmisc.c \
813 uip/mhfree.c \
814 uip/mhshowsbr.c \
815 uip/mhlistsbr.c \
816 #
817 uip_mhfixmsg_LDADD = $(LDADD) $(TERMLIB) $(ICONVLIB) $(POSTLINK)
818
819 uip_mhical_SOURCES = uip/mhical.c
820 uip_mhical_LDADD = $(LDADD) $(TERMLIB) $(ICONVLIB) $(POSTLINK)
821
822 uip_mhlist_SOURCES = uip/mhlist.c \
823 uip/mhparse.c \
824 uip/mhlistsbr.c \
825 uip/mhmisc.c \
826 uip/mhfree.c \
827 #
828 uip_mhlist_LDADD = $(LDADD) $(TERMLIB) $(ICONVLIB) $(POSTLINK)
829
830 uip_mhn_SOURCES = uip/mhn.c \
831 uip/mhparse.c \
832 uip/mhshowsbr.c \
833 uip/mhlistsbr.c \
834 uip/mhstoresbr.c \
835 uip/mhmisc.c \
836 uip/mhfree.c \
837 #
838 uip_mhn_LDADD = $(LDADD) $(TERMLIB) $(ICONVLIB) $(POSTLINK)
839
840 uip_mhparam_SOURCES = uip/mhparam.c
841 uip_mhparam_LDADD = $(LDADD) $(POSTLINK)
842
843 uip_mhpath_SOURCES = uip/mhpath.c
844 uip_mhpath_LDADD = $(LDADD) $(POSTLINK)
845
846 uip_mhshow_SOURCES = uip/mhshow.c \
847 uip/mhparse.c \
848 uip/mhshowsbr.c \
849 uip/mhlistsbr.c \
850 uip/mhmisc.c \
851 uip/mhfree.c \
852 #
853 uip_mhshow_LDADD = $(LDADD) $(TERMLIB) $(ICONVLIB) $(POSTLINK)
854
855 uip_mhstore_SOURCES = uip/mhstore.c \
856 uip/mhparse.c \
857 uip/mhshowsbr.c \
858 uip/mhlistsbr.c \
859 uip/mhstoresbr.c \
860 uip/mhmisc.c \
861 uip/mhfree.c \
862 #
863 uip_mhstore_LDADD = $(LDADD) $(TERMLIB) $(ICONVLIB) $(POSTLINK)
864
865 uip_msgchk_SOURCES = uip/msgchk.c uip/popsbr.c
866 uip_msgchk_LDADD = $(LDADD) $(SASLLIB) $(CURLLIB) $(TLSLIB) $(POSTLINK)
867
868 uip_new_SOURCES = uip/new.c
869 uip_new_LDADD = $(LDADD) $(POSTLINK)
870
871 uip_packf_SOURCES = uip/packf.c uip/dropsbr.c
872 uip_packf_LDADD = $(LDADD) $(POSTLINK)
873
874 uip_pick_SOURCES = uip/pick.c uip/picksbr.c
875 uip_pick_LDADD = $(LDADD) $(ICONVLIB) $(POSTLINK)
876
877 uip_prompter_SOURCES = uip/prompter.c
878 uip_prompter_LDADD = $(LDADD) $(POSTLINK)
879
880 uip_refile_SOURCES = uip/refile.c
881 uip_refile_LDADD = $(LDADD) $(POSTLINK)
882
883 uip_repl_SOURCES = uip/repl.c uip/replsbr.c uip/whatnowproc.c uip/whatnowsbr.c \
884 uip/sendsbr.c uip/annosbr.c uip/distsbr.c
885 uip_repl_LDADD = $(LDADD) $(READLINELIB) $(TERMLIB) $(ICONVLIB) $(POSTLINK)
886
887 uip_rmf_SOURCES = uip/rmf.c
888 uip_rmf_LDADD = $(LDADD) $(POSTLINK)
889
890 uip_rmm_SOURCES = uip/rmm.c
891 uip_rmm_LDADD = $(LDADD) $(POSTLINK)
892
893 uip_scan_SOURCES = uip/scan.c uip/scansbr.c
894 uip_scan_LDADD = $(LDADD) $(TERMLIB) $(ICONVLIB) $(POSTLINK)
895
896 uip_send_SOURCES = uip/send.c uip/sendsbr.c uip/annosbr.c \
897 uip/distsbr.c
898 uip_send_LDADD = $(LDADD) $(TERMLIB) $(ICONVLIB) $(POSTLINK)
899
900 uip_show_SOURCES = uip/show.c uip/mhlsbr.c
901 uip_show_LDADD = $(LDADD) $(TERMLIB) $(ICONVLIB) $(POSTLINK)
902
903 uip_sortm_SOURCES = uip/sortm.c
904 uip_sortm_LDADD = $(LDADD) $(POSTLINK)
905
906 uip_whatnow_SOURCES = uip/whatnow.c uip/whatnowsbr.c uip/sendsbr.c \
907 uip/annosbr.c uip/distsbr.c
908 uip_whatnow_LDADD = $(LDADD) $(READLINELIB) $(TERMLIB) $(ICONVLIB) $(POSTLINK)
909
910 uip_whom_SOURCES = uip/whom.c uip/distsbr.c
911 uip_whom_LDADD = $(LDADD) $(POSTLINK)
912
913 ##
914 ## Program definitions for all utilities that end up in $(nmhlibexecdir)
915 ##
916
917 uip_ap_SOURCES = uip/ap.c
918 uip_ap_LDADD = $(LDADD) $(TERMLIB) $(ICONVLIB) $(POSTLINK)
919
920 uip_dp_SOURCES = uip/dp.c
921 uip_dp_LDADD = $(LDADD) $(TERMLIB) $(ICONVLIB) $(POSTLINK)
922
923 uip_fmtdump_SOURCES = uip/fmtdump.c
924 uip_fmtdump_LDADD = $(LDADD) $(TERMLIB) $(ICONVLIB) $(POSTLINK)
925
926 uip_fmttest_SOURCES = uip/fmttest.c
927 uip_fmttest_LDADD = $(LDADD) $(TERMLIB) $(ICONVLIB) $(POSTLINK)
928
929 uip_mhl_SOURCES = uip/mhl.c uip/mhlsbr.c
930 uip_mhl_LDADD = $(LDADD) $(TERMLIB) $(ICONVLIB) $(POSTLINK)
931
932 uip_mhlogin_SOURCES = uip/mhlogin.c
933 uip_mhlogin_LDADD = mts/libmts.a $(LDADD) $(CURLLIB) $(POSTLINK)
934
935 uip_mkstemp_SOURCES = uip/mkstemp.c
936 uip_mkstemp_LDADD = $(LDADD) $(POSTLINK)
937
938 uip_post_SOURCES = uip/post.c uip/aliasbr.c
939 uip_post_LDADD = mts/libmts.a $(LDADD) $(SASLLIB) $(CURLLIB) $(TLSLIB) \
940 $(POSTLINK)
941
942 uip_rcvdist_SOURCES = uip/rcvdist.c uip/distsbr.c
943 uip_rcvdist_LDADD = $(LDADD) $(TERMLIB) $(ICONVLIB) $(POSTLINK)
944
945 uip_rcvpack_SOURCES = uip/rcvpack.c uip/dropsbr.c
946 uip_rcvpack_LDADD = $(LDADD) $(POSTLINK)
947
948 uip_rcvstore_SOURCES = uip/rcvstore.c
949 uip_rcvstore_LDADD = $(LDADD) $(POSTLINK)
950
951 uip_rcvtty_SOURCES = uip/rcvtty.c uip/scansbr.c
952 uip_rcvtty_LDADD = $(LDADD) $(TERMLIB) $(ICONVLIB) $(POSTLINK)
953
954 uip_slocal_SOURCES = uip/slocal.c uip/aliasbr.c uip/dropsbr.c
955 uip_slocal_LDADD = $(LDADD) $(NDBM_LIBS) $(POSTLINK)
956
957 uip_viamail_SOURCES = uip/viamail.c uip/mhmisc.c uip/sendsbr.c \
958 uip/annosbr.c uip/distsbr.c
959 uip_viamail_LDADD = $(LDADD) $(TERMLIB) $(ICONVLIB) $(POSTLINK)
960
961 ##
962 ## Other program definitions
963 ##
964
965 test_getfullname_SOURCES = test/getfullname.c
966 test_getfullname_LDADD = $(LDADD) $(POSTLINK)
967
968 test_getcanon_SOURCES = test/getcanon.c
969 test_getcanon_LDADD = $(POSTLINK)
970
971 test_fakepop_SOURCES = test/fakepop.c test/server.c
972 test_fakepop_LDADD = $(POSTLINK)
973
974 test_fakesmtp_SOURCES = test/fakesmtp.c test/server.c
975 test_fakesmtp_LDADD = $(POSTLINK)
976
977 test_fakehttp_SOURCES = test/fakehttp.c test/server.c
978 test_fakehttp_LDADD = $(LDADD) $(POSTLINK)
979
980 test_getcwidth_SOURCES = test/getcwidth.c
981 test_getcwidth_LDADD = $(POSTLINK)
982
983 test_runpty_SOURCES = test/runpty.c
984 test_runpty_LDADD = $(POSTLINK)
985
986 ##
987 ## Our rebuild rules for files that aren't built via the normal mechanisms
988 ##
989
990 ## Hard-code the config/version.c target, instead of using $@, so this
991 ## rule works for the distcheck target with Solaris (System V) make.
992 ## distcheck uses VPATH, causes that make to prepend the VPATH to $@.
993 config/version.c: Makefile $(srcdir)/config/version.sh
994 env srcdir="$(srcdir)" sh $(srcdir)/config/version.sh $(VERSION) > ./config/version.c
995
996 etc/bash_completion_nmh: $(srcdir)/etc/bash_completion_nmh-gen
997 $(srcdir)/etc/bash_completion_nmh-gen > $@
998
999 etc/mts.conf: $(srcdir)/etc/mts.conf.in Makefile
1000 @rm -f $@
1001 $(SED) -e 's,%mts%,$(MTS),' \
1002 -e 's,%mailspool%,$(mailspool),' \
1003 -e 's,%smtpserver%,$(smtpserver),' \
1004 -e 's,%default_locking%,$(default_locking),' \
1005 -e 's,%supported_locks%,$(supported_locks),' \
1006 < $(srcdir)/etc/mts.conf.in > $@
1007
1008 etc/mhn.defaults: $(srcdir)/etc/mhn.defaults.sh $(MHNSEARCHPROG)
1009 @rm -f $@
1010 $(srcdir)/etc/mhn.defaults.sh $(MHNSEARCHPATH) $(MHNSEARCHPROG) > $@
1011
1012 ##
1013 ## Use configure to set up default LN, but through a make variable so
1014 ## that it can be overridden at install time.
1015 ##
1016 LN = @LN@
1017
1018 ##
1019 ## This rule gets called at "make install" time; we use it to create links
1020 ## between different programs.
1021 ##
1022 install-exec-hook:
1023 @rm -f $(DESTDIR)$(bindir)/flists$(EXEEXT)
1024 @rm -f $(DESTDIR)$(bindir)/folders$(EXEEXT)
1025 @rm -f $(DESTDIR)$(bindir)/fnext$(EXEEXT)
1026 @rm -f $(DESTDIR)$(bindir)/fprev$(EXEEXT)
1027 @rm -f $(DESTDIR)$(bindir)/unseen$(EXEEXT)
1028 @rm -f $(DESTDIR)$(bindir)/prev$(EXEEXT)
1029 @rm -f $(DESTDIR)$(bindir)/next$(EXEEXT)
1030 $(LN) $(DESTDIR)$(bindir)/flist$(EXEEXT) $(DESTDIR)$(bindir)/flists$(EXEEXT)
1031 $(LN) $(DESTDIR)$(bindir)/folder$(EXEEXT) $(DESTDIR)$(bindir)/folders$(EXEEXT)
1032 $(LN) $(DESTDIR)$(bindir)/new$(EXEEXT) $(DESTDIR)$(bindir)/fnext$(EXEEXT)
1033 $(LN) $(DESTDIR)$(bindir)/new$(EXEEXT) $(DESTDIR)$(bindir)/fprev$(EXEEXT)
1034 $(LN) $(DESTDIR)$(bindir)/new$(EXEEXT) $(DESTDIR)$(bindir)/unseen$(EXEEXT)
1035 $(LN) $(DESTDIR)$(bindir)/show$(EXEEXT) $(DESTDIR)$(bindir)/prev$(EXEEXT)
1036 $(LN) $(DESTDIR)$(bindir)/show$(EXEEXT) $(DESTDIR)$(bindir)/next$(EXEEXT)
1037 if test x$(SETGID_MAIL) != x; then \
1038 chgrp $(MAIL_SPOOL_GRP) $(DESTDIR)$(bindir)/inc$(EXEEXT) && \
1039 chmod 2755 $(DESTDIR)$(bindir)/inc$(EXEEXT); \
1040 fi
1041
1042 ##
1043 ## Make sure we remove those links at uninstall time
1044 ##
1045 uninstall-hook:
1046 rm -f $(DESTDIR)$(bindir)/flists$(EXEEXT)
1047 rm -f $(DESTDIR)$(bindir)/folders$(EXEEXT)
1048 rm -f $(DESTDIR)$(bindir)/fnext$(EXEEXT)
1049 rm -f $(DESTDIR)$(bindir)/fprev$(EXEEXT)
1050 rm -f $(DESTDIR)$(bindir)/unseen$(EXEEXT)
1051 rm -f $(DESTDIR)$(bindir)/prev$(EXEEXT)
1052 rm -f $(DESTDIR)$(bindir)/next$(EXEEXT)
1053
1054 ##
1055 ## Our rules to build our internal libraries (libmh.a, libmts.a)
1056 ##
1057 sbr_libmh_a_SOURCES = \
1058 config/config.c \
1059 config/version.c \
1060 sbr/addrsbr.c \
1061 sbr/ambigsw.c \
1062 sbr/arglist.c \
1063 sbr/atooi.c \
1064 sbr/base64.c \
1065 sbr/brkstring.c \
1066 sbr/charstring.c \
1067 sbr/check_charset.c \
1068 sbr/client.c \
1069 sbr/concat.c \
1070 sbr/context_del.c \
1071 sbr/context_find.c \
1072 sbr/context_foil.c \
1073 sbr/context_read.c \
1074 sbr/context_replace.c \
1075 sbr/context_save.c \
1076 sbr/copyip.c \
1077 sbr/cpydata.c \
1078 sbr/cpydgst.c \
1079 sbr/crawl_folders.c \
1080 sbr/credentials.c \
1081 sbr/ctype-checked.c \
1082 sbr/datetime.c \
1083 sbr/discard.c \
1084 sbr/done.c \
1085 sbr/dtime.c \
1086 sbr/dtimep.l \
1087 sbr/encode_rfc2047.c \
1088 sbr/error.c \
1089 sbr/escape_addresses.c \
1090 sbr/ext_hook.c \
1091 sbr/fdcompare.c \
1092 sbr/fmt_addr.c \
1093 sbr/fmt_compile.c \
1094 sbr/fmt_new.c \
1095 sbr/fmt_rfc2047.c \
1096 sbr/fmt_scan.c \
1097 sbr/folder_addmsg.c \
1098 sbr/folder_delmsgs.c \
1099 sbr/folder_free.c \
1100 sbr/folder_pack.c \
1101 sbr/folder_read.c \
1102 sbr/folder_realloc.c \
1103 sbr/getarguments.c \
1104 sbr/getcpy.c \
1105 sbr/geteditor.c \
1106 sbr/getfolder.c \
1107 sbr/getpass.c \
1108 sbr/icalendar.l \
1109 sbr/icalparse.y \
1110 sbr/lock_file.c \
1111 sbr/m_atoi.c \
1112 sbr/m_backup.c \
1113 sbr/m_convert.c \
1114 sbr/m_draft.c \
1115 sbr/m_getfld.c \
1116 sbr/m_gmprot.c \
1117 sbr/m_maildir.c \
1118 sbr/m_mktemp.c \
1119 sbr/m_name.c \
1120 sbr/m_popen.c \
1121 sbr/m_rand.c \
1122 sbr/makedir.c \
1123 sbr/message_id.c \
1124 sbr/mf.c \
1125 sbr/mime_type.c \
1126 sbr/mts.c \
1127 sbr/netsec.c \
1128 sbr/oauth.c \
1129 sbr/oauth_prof.c \
1130 sbr/path.c \
1131 sbr/pidstatus.c \
1132 sbr/pidwait.c \
1133 sbr/print_help.c \
1134 sbr/print_sw.c \
1135 sbr/print_version.c \
1136 sbr/push.c \
1137 sbr/r1bindex.c \
1138 sbr/read_line.c \
1139 sbr/read_switch.c \
1140 sbr/read_switch_multiword.c \
1141 sbr/read_switch_multiword_via_readline.c \
1142 sbr/read_yes_or_no_if_tty.c \
1143 sbr/readconfig.c \
1144 sbr/refile.c \
1145 sbr/remdir.c \
1146 sbr/ruserpass.c \
1147 sbr/seq_add.c \
1148 sbr/seq_bits.c \
1149 sbr/seq_del.c \
1150 sbr/seq_getnum.c \
1151 sbr/seq_list.c \
1152 sbr/seq_nameok.c \
1153 sbr/seq_print.c \
1154 sbr/seq_read.c \
1155 sbr/seq_save.c \
1156 sbr/seq_setcur.c \
1157 sbr/seq_setprev.c \
1158 sbr/seq_setunseen.c \
1159 sbr/showfile.c \
1160 sbr/signals.c \
1161 sbr/smatch.c \
1162 sbr/snprintb.c \
1163 sbr/ssequal.c \
1164 sbr/strindex.c \
1165 sbr/terminal.c \
1166 sbr/trimcpy.c \
1167 sbr/unquote.c \
1168 sbr/uprf.c \
1169 sbr/utils.c \
1170 sbr/vector.c \
1171 sbr/vfgets.c \
1172 thirdparty/jsmn/jsmn.c \
1173 #
1174
1175 sbr_libmh_a_LIBADD = $(LIBOBJS)
1176
1177 ##
1178 ## Need explicit dependency so that YACC is run before LEX.
1179 ##
1180 sbr/icalendar.c: sbr/icalparse.c
1181
1182 ##
1183 ## Because these files use the definitions in the libmh rule below,
1184 ## they need to be rebuilt if the Makefile changes.
1185 ##
1186
1187 config/sbr_libmh_a-config.$(OBJEXT) sbr/sbr_libmh_a-mts.$(OBJEXT): Makefile
1188
1189 sbr_libmh_a_CPPFLAGS = ${AM_CPPFLAGS} \
1190 -DNMHBINDIR='"$(bindir)"' \
1191 -DNMHLIBEXECDIR='"$(nmhlibexecdir)"' \
1192 -DNMHETCDIR='"@nmhetcdirinst@$(nmhetcdir)"' \
1193 -DNMHDOCDIR='"@docdir@"' \
1194 -DMAILSPOOL='"$(mailspool)"' \
1195 -DSENDMAILPATH='"$(sendmailpath)"'
1196
1197 mts_libmts_a_SOURCES = mts/smtp/smtp.c
1198
1199 ##
1200 ## Our rules for generating man pages (both the rule for man.sed and
1201 ## the implicit rules for man page generation).
1202 ##
1203 manext1 = 1
1204 manext5 = 5
1205 manext7 = 7
1206 manext8 = 8
1207
1208 $(man_MANS): man/man.sed
1209
1210 man/man.sed: Makefile
1211 @echo 's,%nmhwarning%,THIS FILE HAS BEEN AUTOMATICALLY GENERATED. DO NOT EDIT.,g' > $@
1212 @echo 's,%nmhversion%,nmh-$(VERSION),g' >> $@
1213 @echo 's,%nmhetcdir%,$(nmhetcdir),g' >> $@
1214 @echo 's,%nmhlibexecdir%,$(nmhlibexecdir),g' >> $@
1215 @echo 's,%bindir%,$(bindir),g' >> $@
1216 @echo 's,%docdir%,$(docdir),g' >> $@
1217 @echo 's,%mandir%,$(mandir),g' >> $@
1218 @echo 's,%mailspool%,$(mailspool),g' >> $@
1219 @echo 's,%sendmailpath%,$(sendmailpath),g' >> $@
1220 @echo 's,%default_locking%,$(default_locking),g' >> $@
1221 @echo 's,%supported_locks%,$(supported_locks),g' >> $@
1222 @echo 's,%manext1%,$(manext1),g' >> $@
1223 @echo 's,%manext5%,$(manext5),g' >> $@
1224 @echo 's,%manext7%,$(manext7),g' >> $@
1225 @echo 's,%manext8%,$(manext8),g' >> $@
1226 @echo '/%mhl_forward%/r $(top_srcdir)/etc/mhl.forward' >> $@
1227 @echo ' s,%mhl_forward%,,g' >> $@
1228 @echo '/%mhl_format%/r $(top_srcdir)/etc/mhl.format' >> $@
1229 @echo ' s,%mhl_format%,,g' >> $@
1230 @echo '/%mhl_reply%/r $(top_srcdir)/etc/mhl.reply' >> $@
1231 @echo ' s,%mhl_reply%,,g' >> $@
1232
1233 man/mh-chart.man: $(man_SRCS)
1234 $(srcdir)/man/mh-chart-gen.sh > $@
1235
1236 .man.$(manext1):
1237 $(SED) -f man/man.sed $< > $@
1238
1239 .man.$(manext5):
1240 $(SED) -f man/man.sed $< > $@
1241
1242 .man.$(manext7):
1243 $(SED) -f man/man.sed $< > $@
1244
1245 .man.$(manext8):
1246 $(SED) -f man/man.sed $< > $@
1247
1248 man: $(man_MANS)
1249
1250 cleanman:
1251 rm -f $(man_MANS)
1252
1253 .PHONY: man cleanman
1254
1255 ## Don't include commit hashes in ChangeLog.
1256 ChangeLog:
1257 @[ -d $(srcdir)/.git ] && (cd $(srcdir); git --no-pager log --abbrev-commit | \
1258 egrep -v '^commit [0-9a-f]+$$' > $@) || true
1259 ## Make ChangeLog phony so it will always get regenerated. But don't
1260 ## fail if we don't have a git repository in order to allow
1261 ## regeneration of distribution archive or RPM.
1262 .PHONY: ChangeLog
1263
1264 ##
1265 ## Our RPM build target
1266 ##
1267 rpm: dist
1268 @$(MKDIR_P) $(rpmdir)/SOURCES
1269 @mv -f $(DIST_ARCHIVES) $(rpmdir)/SOURCES
1270 @cp -p VERSION $(rpmdir)/SOURCES
1271 @rpmbuild --define '_topdir $(rpmdir)' \
1272 --define '_tmppath %{_topdir}/TMP' \
1273 --define "_sysconfdir $(DESTDIR)$(sysconfdir)" \
1274 -ba SPECS/nmh.spec
1275 .PHONY: rpm
1276
1277
1278 ##
1279 ## Use GNU gcov to find the coverage of the test suite.
1280 ## These targets are not integrated into the other automake
1281 ## targets because they will be used so infrequently, if at all.
1282 ##
1283 gcov: gcov-rebuild gcov-run gcov-process gcov-report
1284 gcov-rebuild:
1285 @echo rebuilding with AM_CFLAGS=--coverage . . .
1286 @(make clean && make AM_CFLAGS=--coverage) > /dev/null
1287 gcov-run:
1288 make check AM_CFLAGS=--coverage
1289 gcov-process:
1290 @for i in `find . -name '*.gcda'`; do \
1291 gcov -pro `echo $$i | $(SED) 's%\\(.*\\)/%\\1 %'`; \
1292 done
1293 gcov-report:
1294 @for i in `find . -name '*.gcno'`; do \
1295 if test -f `echo $$i | sed 's%\.gcno%.gcda%'`; then :; else \
1296 echo untested: $$i; \
1297 fi; \
1298 done
1299 gcov-mostlyclean:
1300 @find . -name '*.gcno' -o -name '*.gcda' | xargs rm
1301 gcov-clean: gcov-mostlyclean
1302 @find . -name '*.gcov' | xargs rm
1303 .PHONY: gcov gcov-rebuild gcov-run gcov-process gcov-report \
1304 gcov-mostlyclean gcov-clean
1305
1306
1307 ##
1308 ## Rules to upload the distribution to savannah
1309 ##
1310 upload: dist
1311 @if test -z "$(SAVANNAH_USERNAME)"; then \
1312 echo "You need to set SAVANNAH_USERNAME to the your username on savannah.gnu.org." ;\
1313 echo "You can set it either in your environment or on the make command line."; \
1314 false; \
1315 fi
1316 @echo "Did you run 'make distcheck' already?"
1317 @if test -z "$(SKIP_GPG_SIG)"; then \
1318 echo "Creating GPG signature (set SKIP_GPG_SIG to bypass this step)"; \
1319 gpg --output $(DIST_ARCHIVES).sig --detach-sig $(DIST_ARCHIVES); \
1320 fi
1321 @echo "Setting permissions for savannah.gnu.org"
1322 chmod 664 $(DIST_ARCHIVES)
1323 if test -f $(DIST_ARCHIVES).sig; then \
1324 chmod 664 $(DIST_ARCHIVES).sig; \
1325 fi
1326 @echo "Uploading to savannah"
1327 scp -p $(DIST_ARCHIVES)* $(SAVANNAH_USERNAME)@dl.sv.nongnu.org:/releases/nmh
1328 .PHONY: upload