summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTodd C. Miller <millert@cvs.openbsd.org>2000-02-17 18:54:16 +0000
committerTodd C. Miller <millert@cvs.openbsd.org>2000-02-17 18:54:16 +0000
commite3f3072ae5f7d87a91992fbdd5221131e1490081 (patch)
tree6e002c21965032dc931899ed81169a833f275996
parent073149273bf024bb8099028b5bbb5b880f7a3dfb (diff)
Use the version of tic in the build tree, if available. This will make
it easier for folks upgrading from 2.6.
-rw-r--r--share/termtypes/Makefile21
1 files changed, 14 insertions, 7 deletions
diff --git a/share/termtypes/Makefile b/share/termtypes/Makefile
index 080581b1c5f..c78c35fb03d 100644
--- a/share/termtypes/Makefile
+++ b/share/termtypes/Makefile
@@ -1,4 +1,4 @@
-# $OpenBSD: Makefile,v 1.13 2000/01/12 16:37:48 millert Exp $
+# $OpenBSD: Makefile,v 1.14 2000/02/17 18:54:15 millert Exp $
#
# Take termcap/terminfo master file and generate termcap/terminfo .db files
# master: http://www.tuxedo.org/~esr/terminfo/termtypes.master.gz
@@ -6,19 +6,26 @@
MAN= termcap.5
CLEANFILES+= terminfo.src termcap.src terminfo.db termcap.db
+# Use the tic we just built if possible
+.if exists(../../usr.bin/tic/tic)
+TIC= ../../usr.bin/tic/tic
+.else
+TIC= /usr/bin/tic
+.endif
+
all: terminfo.db termcap.db
terminfo.src: termtypes.master
- tic -I -x ${.ALLSRC} | sed \
+ ${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 ;\
+ echo ${.TARGET} is zero length! You need to update ${TIC} ;\
rm -f ${.TARGET} ;\
exit 1 ;\
else case `sed 1q ${.TARGET}` in \
- Usage*) echo ${.TARGET} is corrupt! You need to update /usr/bin/tic ;\
+ Usage*) echo ${.TARGET} is corrupt! You need to update ${TIC} ;\
rm -f ${.TARGET} ;\
exit 1 ;;\
esac ;\
@@ -28,16 +35,16 @@ terminfo.db: terminfo.src
cap_mkdb -i -f terminfo terminfo.src
termcap.src: termtypes.master
- tic -C -x ${.ALLSRC} | sed \
+ ${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 ;\
+ echo ${.TARGET} is zero length! You need to update ${TIC} ;\
rm -f ${.TARGET} ;\
exit 1 ;\
else case `sed 1q ${.TARGET}` in \
- Usage*) echo ${.TARGET} is corrupt! You need to update /usr/bin/tic ;\
+ Usage*) echo ${.TARGET} is corrupt! You need to update ${TIC} ;\
rm -f ${.TARGET} ;\
exit 1 ;;\
esac ;\