1 1.7 christos # $NetBSD: Makefile,v 1.7 2017/04/21 23:07:45 christos 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.3 wiz SRCS.makemandb= makemandb.c apropos-utils.c manconf.c 10 1.3 wiz SRCS.apropos= apropos.c apropos-utils.c manconf.c 11 1.3 wiz SRCS.whatis= whatis.c apropos-utils.c manconf.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 .if ${MKCRYPTO:Uno} == "yes" 30 1.7 christos LDADD.makemandb+= -lcrypto 31 1.7 christos DPADD.makemandb+= ${LIBCRYPTO} 32 1.7 christos .endif 33 1.7 christos 34 1.5 christos DPADD+= ${LIBSQLITE3} ${LIBM} ${LIBZ} ${LIBTERMLIB} ${LIBUTIL} 35 1.5 christos LDADD+= -lsqlite3 -lm -lz -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.1 joerg DPSRCS+= stopwords.c 45 1.1 joerg CLEANFILES+= stopwords.c 46 1.1 joerg 47 1.1 joerg .include <bsd.prog.mk> 48