NetBSD/usr.bin/mail/Makefile
dholland c3ab26950f Rework /usr/share/doc.
Update the <bsd.doc.mk> infrastructure, and update the docs to match
the new infrastructure.

- Build and install text, ps, pdf, and/or html, not roff sources.

- Don't wire the chapter numbers into the build system, or use them in
the installed pathnames. This didn't matter much when the docs were a
museum, but now that we're theoretically going to start maintaining
them again, we're going to add and remove documents periodically and
having the chapter numbers baked in creates a lot of thrashing for no
purpose.

- Specify the document name explicitly, rather than implicitly in a
path. Use this name (instead of other random strings) as the name
of the installed files.

- Specify the document section, which is the subdirectory of
/usr/share/doc to install into.

- Allow multiple subdocuments. (That is, multiple documents in one
output directory.)

- Enumerate the .png files groff emits along with html so they can be
installed.

- Remove assorted hand-rolled rules for running roff and roff widgetry
and add enough variable settings to make these unnecessary. This
includes support for
   - explicit use of soelim
   - refer
   - tbl
   - pic
   - eqn

- Forcibly apply at least minimal amounts of sanity to certain
autogenerated roff files.

- Don't exclude USD.doc, SMM.doc, and PSD.doc directories from the
build, as they now actually do stuff.

Note: currently we can't generate pdf. This turns out to be a
nontrivial problem with no immediate solution forthcoming. So for now,
as a workaround, install compressed .ps as the printable form.
2014-07-05 19:22:02 +00:00

83 lines
1.8 KiB
Makefile

# $NetBSD: Makefile,v 1.36 2014/07/05 19:22:04 dholland Exp $
# @(#)Makefile 8.3 (Berkeley) 4/20/95
.include <bsd.own.mk>
USE_FORT?= yes # data-driven bugs?
USE_EDITLINE?=yes
MIME_SUPPORT?=yes # currently requires USE_EDITLINE
CHARSET_SUPPORT?=yes # requires MIME_SUPPORT
THREAD_SUPPORT?=yes # EXPERIMENTAL
# Work around some problems in -current.
# See the source code for more info.
#
CPPFLAGS+= -DBROKEN_EXEC_TTY_RESTORE # broken since 4.99.10
CPPFLAGS+= -DBROKEN_CLONE_STAT # see PRs 37878 and 37550
CPPFLAGS+= -DBROKEN_MAGIC # bad MIME type on short files
# Debugging options (most should go away - please leave for now).
#
#CPPFLAGS+= -DDEBUG_FILE_LEAK
PROG= mail
SRCS= version.c support.c cmd1.c cmd2.c cmd3.c cmd4.c cmdtab.c collect.c \
dotlock.c edit.c fio.c format.c getname.c head.c v7.local.c lex.c \
list.c main.c names.c popen.c quit.c send.c sig.c strings.c temp.c \
tty.c vars.c
LINKS= ${BINDIR}/mail ${BINDIR}/Mail ${BINDIR}/mail ${BINDIR}/mailx
MLINKS= mail.1 Mail.1 mail.1 mailx.1
LDADD+= -lutil
DPADD+= ${LIBUTIL}
.if ${USE_EDITLINE:Uno} == "yes"
SRCS+= complete.c
CPPFLAGS+= -DUSE_EDITLINE
LDADD+= -ledit -lterminfo
DPADD+= ${LIBEDIT} ${LIBTERMINFO}
.if ${MIME_SUPPORT:Uno} == "yes"
SRCS+= mime_attach.c
SRCS+= mime_child.c
SRCS+= mime_codecs.c
SRCS+= mime_decode.c
SRCS+= mime_detach.c
SRCS+= mime_header.c
CPPFLAGS+= -DMIME_SUPPORT
.if ${CHARSET_SUPPORT:Uno} == "yes"
CPPFLAGS+= -DCHARSET_SUPPORT
.endif
LDADD+= -lmagic -lz
DPADD+= ${LIBMAGIC} ${LIBZ}
.endif
.endif
.if ${THREAD_SUPPORT:Uno} == "yes"
SRCS+= thread.c
CPPFLAGS+= -DTHREAD_SUPPORT
.endif
CWARNFLAGS+= -Wextra
.PATH: ${.CURDIR}/misc
.if ${MKSHARE} != "no"
FILESDIR= /usr/share/misc
FILES= mail.help mail.tildehelp
.endif
SUBDIR+= USD.doc
CONFIGFILES= mail.rc
FILESDIR_mail.rc= /etc
COPTS.format.c += -Wno-format-nonliteral
.include <bsd.prog.mk>
.include <bsd.subdir.mk>