7 .if ${MK_BSD_GREP} != "yes"
12 SRCS= closeout.c dfa.c error.c exclude.c grep.c grepmat.c hard-locale.c \
13 isdir.c kwset.c obstack.c quotearg.c savedir.c search.c xmalloc.c \
15 CLEANFILES+= gnugrep.1
17 CFLAGS+=-I${.CURDIR} -I${SYSROOT:U${DESTDIR}}/usr/include/gnu -DHAVE_CONFIG_H
19 .if ${MK_BSD_GREP} != "yes"
20 LINKS+= ${BINDIR}/grep ${BINDIR}/egrep \
21 ${BINDIR}/grep ${BINDIR}/fgrep
22 MLINKS= grep.1 egrep.1 grep.1 fgrep.1
27 .if defined(GREP_LIBZ) && !empty(GREP_LIBZ)
33 ${CP} ${.ALLSRC} ${.TARGET}
37 for tst in ${TESTS}; do \
38 total=$$(($$total+1)); \
39 if GREP=${.OBJDIR}/${PROG} srcdir=${.CURDIR}/tests \
40 ${.CURDIR}/tests/$$tst; then \
43 failed=$$(($$failed+1)); \
47 if [ "$$failed" -eq 0 ]; then \
48 echo "All $$total tests passed"; \
50 echo "$$failed of $$total tests failed"; \
53 TESTS= warning.sh khadafy.sh spencer1.sh bre.sh ere.sh status.sh empty.sh \
54 options.sh backref.sh file.sh
56 .include <bsd.prog.mk>