xref: /freebsd/share/termcap/Makefile (revision 633d178c63bef1110acde1932f97eb90da8881e8)
1#	@(#)Makefile	8.1 (Berkeley) 6/8/93
2# $FreeBSD$
3
4# reorder gives an editor command for most common terminals
5# (in reverse order from n'th to 1'st most commonly used)
6# to move them to the front of termcap
7#
8MAN=	termcap.5
9
10PACKAGE=	runtime
11FILES=		termcap termcap.db
12FILESDIR=	${BINDIR}/misc
13CLEANFILES+=	termcap.db termcap.small
14CONFS=		termcap.small
15
16TERMCAP_SMALL_ENTS?=	SC cons25 cons25-m cons25-w cons25l1 cons25l1-m \
17    cons25l1-w cons25l2 cons25l2-m cons25l7 cons25l7-m cons25r cons25r-m \
18    cons25r-mv cons25r-v cons25w cons30 cons30-m cons30-w cons30l1 cons30l1-m \
19    cons30l1-w cons30l2 cons30l2-m cons30l7 cons30l7-m cons30r cons30r-m \
20    cons30r-mv cons30r-v cons43 cons43-m cons43-w cons43l1 cons43l1-m \
21    cons43l1-w cons43l2 cons43l2-m cons43l7 cons43l7-m cons43r cons43r-m \
22    cons43r-mv cons43r-v cons50 cons50-m cons50-w cons50l1 cons50l1-m \
23    cons50l1-w cons50l2 cons50l2-m cons50l7 cons50l7-m cons50r cons50r-m \
24    cons50r-mv cons50r-v cons60 cons60-m cons60-w cons60l1 cons60l1-m \
25    cons60l1-w cons60l2 cons60l2-m cons60l7 cons60l7-m cons60r cons60r-m \
26    cons60r-mv cons60r-v ecma[+]italics vt100 xterm xterm-basic xterm-clear \
27    xterm-color xterm-new xterm-r6 xterm-r6-clear
28
29.include <bsd.endian.mk>
30.include <src.tools.mk>
31
32termcap.db: termcap
33	${CAP_MKDB_CMD} ${CAP_MKDB_ENDIAN} -f ${.TARGET:R} ${.ALLSRC}
34
35termcap.small: termcap
36	set -e; set -o pipefail; \
37	(echo "# AUTOMATICALLY GENERATED FROM `basename ${.ALLSRC}`"; \
38	for tcname in ${TERMCAP_SMALL_ENTS}; \
39	do \
40		echo; awk "/^$${tcname}[:|]/{ f = 1; print; next } /^[^\t]/{ f = 0 } f" ${.ALLSRC}; \
41	done) > ${.TARGET}
42
43etc-termcap:
44	${INSTALL_SYMLINK} -T "package=runtime" \
45	    ${BINDIR}/misc/termcap ${DESTDIR}/etc/termcap
46
47.include <bsd.prog.mk>
48