Module Name: src Committed By: roy Date: Wed Nov 2 12:09:26 UTC 2011
Modified Files: src/lib/libterminfo: Makefile genhash genterms genthash Removed Files: src/lib/libterminfo: compiled_terms.c hash.c termcap_hash.c Log Message: Now that nbperf can generate the same file using the -p option, there is no longer a need to store these files in CVS. To generate a diff of this commit: cvs rdiff -u -r1.17 -r1.18 src/lib/libterminfo/Makefile cvs rdiff -u -r1.2 -r0 src/lib/libterminfo/compiled_terms.c cvs rdiff -u -r1.7 -r1.8 src/lib/libterminfo/genhash cvs rdiff -u -r1.3 -r1.4 src/lib/libterminfo/genterms cvs rdiff -u -r1.4 -r1.5 src/lib/libterminfo/genthash cvs rdiff -u -r1.4 -r0 src/lib/libterminfo/hash.c cvs rdiff -u -r1.3 -r0 src/lib/libterminfo/termcap_hash.c Please note that diffs are not public domain; they are subject to the copyright notices on the relevant files.
Modified files: Index: src/lib/libterminfo/Makefile diff -u src/lib/libterminfo/Makefile:1.17 src/lib/libterminfo/Makefile:1.18 --- src/lib/libterminfo/Makefile:1.17 Tue Oct 4 11:01:14 2011 +++ src/lib/libterminfo/Makefile Wed Nov 2 12:09:25 2011 @@ -1,4 +1,6 @@ -# $NetBSD: Makefile,v 1.17 2011/10/04 11:01:14 roy Exp $ +# $NetBSD: Makefile,v 1.18 2011/11/02 12:09:25 roy Exp $ + +.include <bsd.own.mk> USE_SHLIBDIR= yes @@ -12,6 +14,8 @@ SRCS+= compile.c hash.c INCS= term.h INCSDIR= /usr/include +COPTS.tparm.c = -Wno-format-nonliteral + MAN= terminfo.3 terminfo.5 MLINKS= terminfo.3 setupterm.3 \ terminfo.3 set_curterm.3 terminfo.3 del_curterm.3 \ @@ -31,12 +35,28 @@ MAN+= termcap.3 MLINKS+= termcap.3 tgetent.3 termcap.3 tgetflag.3 termcap.3 tgetnum.3 \ termcap.3 tgetstr.3 termcap.3 tgoto.3 +CPPFLAGS+= -I${.OBJDIR} + # Generate our string and hash tables -hash: +hash.c: genhash term.h @echo "Generating terminfo hash" - cd ${.CURDIR} && ${HOST_SH} ./genhash >hash.c + cd ${.CURDIR} && ${HOST_SH} ./genhash >${.OBJDIR}/$@ + +termcap_hash.c: genthash term.h @echo "Generating termcap hash" - cd ${.CURDIR} && ${HOST_SH} ./genthash >termcap_hash.c + cd ${.CURDIR} && ${HOST_SH} ./genthash >${.OBJDIR}/$@ + + +# Allow terminfo descriptions to be compiled into libterminfo +compiled_terms.c: genterms term.h ${NETBSDSRCDIR}/share/terminfo/terminfo + @echo "Generating compiled terminfo descriptions" + cd ${.CURDIR} && ${HOST_SH} ./genterms >${.OBJDIR}/$@ + +CLEANFILES+= hash.c termcap_hash.c compiled_terms.c + +term.c: compiled_terms.c + +termcap.c: termcap_hash.c # Generate our man pages terminfo.5: terminfo.5.in term.h termcap_map.c @@ -45,17 +65,8 @@ terminfo.5: terminfo.5.in term.h termcap CLEANFILES+= terminfo.5 -# Allow terminfo descriptions to be compiled into libterminfo -compiled_terms: - @echo "Generating compiled terminfo descriptions" - cd ${.CURDIR} && ${HOST_SH} ./genterms >compiled_terms.c - -COPTS.tparm.c = -Wno-format-nonliteral man: terminfo.5 -gen: hash compiled_terms man - -.include <bsd.own.mk> .include <bsd.shlib.mk> .if ${MKLINKLIB} != "no" Index: src/lib/libterminfo/genhash diff -u src/lib/libterminfo/genhash:1.7 src/lib/libterminfo/genhash:1.8 --- src/lib/libterminfo/genhash:1.7 Tue Oct 12 12:57:51 2010 +++ src/lib/libterminfo/genhash Wed Nov 2 12:09:25 2011 @@ -1,7 +1,7 @@ #!/bin/sh -# $NetBSD: genhash,v 1.7 2010/10/12 12:57:51 christos Exp $ +# $NetBSD: genhash,v 1.8 2011/11/02 12:09:25 roy Exp $ -# Copyright (c) 2009 The NetBSD Foundation, Inc. +# Copyright (c) 2009, 2011 The NetBSD Foundation, Inc. # # This code is derived from software contributed to The NetBSD Foundation # by Roy Marples. @@ -57,7 +57,7 @@ genent() echo $TOOL_SED -e "1,/enum TI${NAME}/d" -e '/};/,$d' \ -e 's/.*TICODE_\([^,]*\).*/\1/' $TERMH | \ - $TOOL_NBPERF -sn _ti_${name}hash; + $TOOL_NBPERF -p -s -n _ti_${name}hash; cat <<EOF @@ -85,7 +85,6 @@ EOF } cat <<EOF -/* \$NetBSD\$ */ /* DO NOT EDIT * Automatically generated from term.h */ @@ -93,9 +92,6 @@ cat <<EOF #include "nbtool_config.h" #endif -#include <sys/cdefs.h> -__RCSID("\$NetBSD: genhash,v 1.7 2010/10/12 12:57:51 christos Exp $"); - #include <stdint.h> #include <stdlib.h> #include <string.h> Index: src/lib/libterminfo/genterms diff -u src/lib/libterminfo/genterms:1.3 src/lib/libterminfo/genterms:1.4 --- src/lib/libterminfo/genterms:1.3 Tue Oct 12 12:57:51 2010 +++ src/lib/libterminfo/genterms Wed Nov 2 12:09:25 2011 @@ -1,7 +1,7 @@ #!/bin/sh -# $NetBSD: genterms,v 1.3 2010/10/12 12:57:51 christos Exp $ +# $NetBSD: genterms,v 1.4 2011/11/02 12:09:25 roy Exp $ -# Copyright (c) 2010 The NetBSD Foundation, Inc. +# Copyright (c) 2010, 2011 The NetBSD Foundation, Inc. # # This code is derived from software contributed to The NetBSD Foundation # by Roy Marples. @@ -34,9 +34,7 @@ set -e : ${NETBSDSRCDIR:=/usr/src} : ${TERMINFO:=${NETBSDSRCDIR}/share/terminfo/terminfo} -echo "/* \$NetBSD\$ */" echo "/* DO NOT EDIT" -echo " * Regenerate by doing \`\`make compiled_terms''" -echo " */" +echo " * Automatically generated from terminfo */" echo ${TOOL_TIC} -Sx ${TERMINFO} ansi dumb vt100 vt220 wsvt25 xterm Index: src/lib/libterminfo/genthash diff -u src/lib/libterminfo/genthash:1.4 src/lib/libterminfo/genthash:1.5 --- src/lib/libterminfo/genthash:1.4 Wed Mar 3 12:09:49 2010 +++ src/lib/libterminfo/genthash Wed Nov 2 12:09:25 2011 @@ -1,7 +1,7 @@ #!/bin/sh -# $NetBSD: genthash,v 1.4 2010/03/03 12:09:49 roy Exp $ +# $NetBSD: genthash,v 1.5 2011/11/02 12:09:25 roy Exp $ -# Copyright (c) 2009 The NetBSD Foundation, Inc. +# Copyright (c) 2009, 2011 The NetBSD Foundation, Inc. # # This code is derived from software contributed to The NetBSD Foundation # by Roy Marples. @@ -36,13 +36,9 @@ set -e TERMCAPC=${1:-termcap_map.c} cat <<EOF -/* \$NetBSD\$ */ /* DO NOT EDIT * Automatically generated from termcap.c */ -#include <sys/cdefs.h> -__RCSID("\$NetBSD: genthash,v 1.4 2010/03/03 12:09:49 roy Exp $"); - #include <stdint.h> #include <stdlib.h> #include <term_private.h> @@ -51,12 +47,12 @@ EOF $TOOL_SED -n -e "1,/_ti_cap_flagids/d" -e '/};/,$d' \ -e 's/.*"\([^"]*\)".*/\1/p' $TERMCAPC | \ - $TOOL_NBPERF -s -n _t_flaghash + $TOOL_NBPERF -p -s -n _t_flaghash echo $TOOL_SED -n -e "1,/_ti_cap_numids/d" -e '/};/,$d' \ -e 's/.*"\([^"]*\)".*/\1/p' $TERMCAPC | \ - $TOOL_NBPERF -s -n _t_numhash + $TOOL_NBPERF -p -s -n _t_numhash echo $TOOL_SED -n -e "1,/_ti_cap_strids/d" -e '/};/,$d' \ -e 's/.*"\([^"]*\)".*/\1/p' $TERMCAPC | \ - $TOOL_NBPERF -s -n _t_strhash + $TOOL_NBPERF -p -s -n _t_strhash