6.1 version numbering.
[dragonfly.git] / share / terminfo / Makefile
1 .include "Makefile.entries"
2
3 NOMAN=
4
5 CLEANFILES+=    run_tic.sed run_tic.sh terminfo.tmp
6 CLEANDIRS+=     terminfo
7
8 TINFODIR=       ${SHAREDIR}/terminfo
9 MISCDIR=        ${.CURDIR}/../../contrib/ncurses/misc
10 TSOURCE=        ${MISCDIR}/terminfo.src
11 TICBOOTSTRAP=   ${.OBJDIR}/../../lib/libncurses/tic_next/tic_next.nx
12
13 # Allow to override to reduce breakage surface (just in case)
14 .if exists(${TICBOOTSTRAP})
15 TIC?=   ${TICBOOTSTRAP}
16 .else
17 TIC?=   tic
18 .endif
19
20 all: terminfo
21
22 run_tic.sed:
23         WHICH_XTERM=xterm-new \
24         ticdir=${FILESDIR}/terminfo \
25         sh ${MISCDIR}/gen_edit.sh > ${.TARGET}
26
27 run_tic.sh:
28         cat ${MISCDIR}/run_tic.in | sed \
29           -e 's;@PROG_EXT@;;g' \
30           -e 's;@DESTDIR@;;g' \
31           -e 's;@TERMINFO@;${.CURDIR}/terminfo;g' \
32           -e 's;@TERMINFO_SRC@;${TSOURCE};g' \
33           -e 's;@TIC@;${TIC};g' \
34           -e 's;@NCURSES_EXT_FUNCS@;1;g' \
35           -e 's;@LN_S@;ln -s -f;g' \
36           -e 's;@prefix@;/usr;g' \
37           -e 's;@exec_prefix@;/usr;g' \
38           -e 's;@bindir@;/usr/bin;g' \
39           -e 's;@datadir@;/usr/share;g' \
40           -e 's;@top_srcdir@;..;g' \
41           -e 's;@srcdir@;.;g' \
42         > ${.TARGET}
43
44
45 terminfo.tmp: run_tic.sed ${TSOURCE}
46         sed -f run_tic.sed ${TSOURCE} > ${.TARGET}
47
48 terminfo: run_tic.sh terminfo.tmp
49         sh run_tic.sh
50
51 install:
52         for ITEM in ${TERMINFO_ENTRIES}; do \
53                 ${INSTALL} -m 644 -o ${BINOWN} -g ${BINGRP}  \
54                 terminfo/$${ITEM} ${DESTDIR}${TINFODIR}/$${ITEM}; \
55         done
56
57 .include <bsd.lib.mk>