File: [local] / src / share / termtypes / Makefile (download)
Revision 1.13, Wed Jan 12 16:37:48 2000 UTC (24 years, 4 months ago) by millert
Branch: MAIN
Changes since 1.12: +13 -1 lines
Hack to detect termcap/terminfo files that just contain a usage string.
This is needed because, until 5 minutes ago, tic prints its usage()
to stdout and not stderr so the zero-length termcap check doesn't help
us here. This hack should be removed after OpenBSD 2.7 is released.
|
# $OpenBSD: Makefile,v 1.13 2000/01/12 16:37:48 millert Exp $
#
# Take termcap/terminfo master file and generate termcap/terminfo .db files
# master: http://www.tuxedo.org/~esr/terminfo/termtypes.master.gz
MAN= termcap.5
CLEANFILES+= terminfo.src termcap.src terminfo.db termcap.db
all: terminfo.db termcap.db
terminfo.src: termtypes.master
tic -I -x ${.ALLSRC} | sed \
-e 's,/usr/share/lib/tabset,/usr/share/tabset,g' \
-e 's,/usr/lib/tabset,/usr/share/tabset,g' \
> ${.TARGET}
@if [ ! -s ${.TARGET} ]; then \
echo ${.TARGET} is zero length! You need to update /usr/bin/tic ;\
rm -f ${.TARGET} ;\
exit 1 ;\
else case `sed 1q ${.TARGET}` in \
Usage*) echo ${.TARGET} is corrupt! You need to update /usr/bin/tic ;\
rm -f ${.TARGET} ;\
exit 1 ;;\
esac ;\
fi
terminfo.db: terminfo.src
cap_mkdb -i -f terminfo terminfo.src
termcap.src: termtypes.master
tic -C -x ${.ALLSRC} | sed \
-e 's,/usr/share/lib/tabset,/usr/share/tabset,g' \
-e 's,/usr/lib/tabset,/usr/share/tabset,g' \
> ${.TARGET}
@if [ ! -s ${.TARGET} ]; then \
echo ${.TARGET} is zero length! You need to update /usr/bin/tic ;\
rm -f ${.TARGET} ;\
exit 1 ;\
else case `sed 1q ${.TARGET}` in \
Usage*) echo ${.TARGET} is corrupt! You need to update /usr/bin/tic ;\
rm -f ${.TARGET} ;\
exit 1 ;;\
esac ;\
fi
termcap.db: termcap.src
cap_mkdb -f termcap termcap.src
realinstall:
${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m 444 terminfo.db \
${DESTDIR}${BINDIR}/misc/terminfo.db
${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m 444 termcap.db \
${DESTDIR}${BINDIR}/misc/termcap.db
${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m 444 termcap.src \
${DESTDIR}${BINDIR}/misc/termcap
${INSTALL} ${INSTALL_COPY} -o ${BINOWN} -g ${BINGRP} -m 444 ${.CURDIR}/map3270 \
${DESTDIR}${BINDIR}/misc/map3270
ln -fs ${BINDIR}/misc/termcap ${DESTDIR}/etc/termcap
.include <bsd.prog.mk>