1 1.12 nia # $NetBSD: Makefile,v 1.12 2020/11/12 17:53:43 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.12 nia DPADD+= ${LIBSQLITE3} ${LIBM} ${LIBZ} ${LIBTERMLIB} ${LIBUTIL} 33 1.12 nia LDADD+= -lsqlite3 -lm -lz -ltermlib -lutil 34 1.1 joerg 35 1.1 joerg stopwords.c: stopwords.txt 36 1.1 joerg ( set -e; ${TOOL_NBPERF} -n stopwords_hash -s -p ${.ALLSRC}; \ 37 1.1 joerg echo 'static const char *stopwords[] = {'; \ 38 1.1 joerg ${TOOL_SED} -e 's|^\(.*\)$$| "\1",|' ${.ALLSRC}; \ 39 1.1 joerg echo '};' \ 40 1.1 joerg ) > ${.TARGET} 41 1.1 joerg 42 1.9 abhinav nostem.c: nostem.txt 43 1.9 abhinav ( set -e; ${TOOL_NBPERF} -n nostem_hash -s -p ${.ALLSRC}; \ 44 1.9 abhinav echo 'static const char *nostem[] = {'; \ 45 1.9 abhinav ${TOOL_SED} -e 's|^\(.*\)$$| "\1",|' ${.ALLSRC}; \ 46 1.9 abhinav echo '};' \ 47 1.9 abhinav ) > ${.TARGET} 48 1.9 abhinav 49 1.9 abhinav DPSRCS+= stopwords.c nostem.c 50 1.9 abhinav CLEANFILES+= stopwords.c nostem.c 51 1.1 joerg 52 1.1 joerg .include <bsd.prog.mk> 53