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