1 1.3 wiz # $NetBSD: Makefile,v 1.3 2012/10/06 15:33:59 wiz Exp $ 2 1.1 joerg 3 1.1 joerg .include <bsd.own.mk> 4 1.1 joerg 5 1.1 joerg MDIST= ${NETBSDSRCDIR}/external/bsd/mdocml/dist 6 1.1 joerg MDOCDIR=${NETBSDSRCDIR}/external/bsd/mdocml 7 1.3 wiz MANCONFDIR=${NETBSDSRCDIR}/usr.bin/man 8 1.1 joerg 9 1.1 joerg PROGS= makemandb apropos whatis 10 1.3 wiz SRCS.makemandb= makemandb.c apropos-utils.c manconf.c 11 1.3 wiz SRCS.apropos= apropos.c apropos-utils.c manconf.c 12 1.3 wiz SRCS.whatis= whatis.c apropos-utils.c manconf.c 13 1.1 joerg MAN.makemandb= makemandb.8 14 1.1 joerg MAN.apropos= apropos.1 15 1.1 joerg MAN.whatis= whatis.1 16 1.1 joerg 17 1.1 joerg BINDIR.apropos= /usr/bin 18 1.1 joerg BINDIR.makemandb= /usr/sbin 19 1.1 joerg BINDIR.whatis= /usr/bin 20 1.1 joerg 21 1.3 wiz .PATH: ${MANCONFDIR} 22 1.3 wiz 23 1.3 wiz CPPFLAGS+=-I${MDIST} -I${MANCONFDIR} -I${.OBJDIR} 24 1.1 joerg 25 1.1 joerg MDOCMLOBJDIR!= cd ${MDOCDIR}/lib/libmandoc && ${PRINTOBJDIR} 26 1.1 joerg MDOCMLLIB= ${MDOCMLOBJDIR}/libmandoc.a 27 1.1 joerg 28 1.2 joerg DPADD.makemandb+= ${MDOCMLLIB} ${LIBARCHIVE} ${LIBBZ2} ${LIBLZMA} 29 1.2 joerg LDADD.makemandb+= -L${MDOCMLOBJDIR} -lmandoc -larchive -lbz2 -llzma 30 1.1 joerg DPADD+= ${LIBSQLITE3} ${LIBM} ${LIBZ} ${LIBUTIL} 31 1.1 joerg LDADD+= -lsqlite3 -lm -lz -lutil 32 1.1 joerg 33 1.1 joerg stopwords.c: stopwords.txt 34 1.1 joerg ( set -e; ${TOOL_NBPERF} -n stopwords_hash -s -p ${.ALLSRC}; \ 35 1.1 joerg echo 'static const char *stopwords[] = {'; \ 36 1.1 joerg ${TOOL_SED} -e 's|^\(.*\)$$| "\1",|' ${.ALLSRC}; \ 37 1.1 joerg echo '};' \ 38 1.1 joerg ) > ${.TARGET} 39 1.1 joerg 40 1.1 joerg DPSRCS+= stopwords.c 41 1.1 joerg CLEANFILES+= stopwords.c 42 1.1 joerg 43 1.1 joerg .include <bsd.prog.mk> 44