1#         $NetBSD: Makefile.hash,v 1.7 2013/01/24 14:17:40 roy Exp $
2
3SCRIPT_ENV=         \
4          NETBSDSRCDIR=${NETBSDSRCDIR:Q} \
5          TOOL_AWK=${TOOL_AWK:Q} \
6          TOOL_NBPERF=${TOOL_NBPERF:Q} \
7          TOOL_SED=${TOOL_SED:Q} \
8          TOOL_SORT=${TOOL_SORT:Q} \
9          TOOL_TIC=${TOOL_TIC:Q}
10
11PARSEDIR:=${.PARSEDIR}
12# Generate our string and hash tables
13hash.c: genhash term.h
14                    @echo "Generating terminfo hash"
15                    ${SCRIPT_ENV} ${HOST_SH} ${.ALLSRC} > ${.TARGET}
16
17termcap_hash.c: genthash termcap_map.c
18                    @echo "Generating termcap hash"
19                    ${SCRIPT_ENV} ${HOST_SH} ${.ALLSRC} > ${.TARGET}
20
21# Allow terminfo descriptions to be compiled into libterminfo
22compiled_terms.c: genterms term.h ${NETBSDSRCDIR}/share/terminfo/terminfo
23                    @echo "Generating compiled terminfo descriptions"
24                    ${SCRIPT_ENV} ${HOST_SH} ${.ALLSRC} > ${.TARGET}
25
26.if ${USETOOLS} == "yes"
27compiled_terms.c: ${TOOL_TIC}
28.endif
29
30DPSRCS+=  hash.c termcap_hash.c compiled_terms.c
31
32CLEANFILES+=        hash.c termcap_hash.c compiled_terms.c
33