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