1999-08-28 01:37:10 +02:00
|
|
|
# $FreeBSD$
|
1999-02-09 18:23:03 +01:00
|
|
|
|
1999-11-22 10:13:43 +01:00
|
|
|
GREP_LIBZ=YES
|
1997-12-20 19:46:09 +01:00
|
|
|
|
1993-06-29 08:04:45 +02:00
|
|
|
PROG= grep
|
1999-11-22 10:13:43 +01:00
|
|
|
SRCS= dfa.c getopt.c getopt1.c grep.c kwset.c obstack.c savedir.c search.c \
|
1999-11-21 10:44:26 +01:00
|
|
|
stpcpy.c
|
1993-07-06 20:45:26 +02:00
|
|
|
|
1999-11-22 10:13:43 +01:00
|
|
|
CFLAGS+=-I${.CURDIR} -DHAVE_CONFIG_H
|
|
|
|
|
|
|
|
LINKS+= ${BINDIR}/grep ${BINDIR}/egrep \
|
1993-07-16 19:48:38 +02:00
|
|
|
${BINDIR}/grep ${BINDIR}/fgrep
|
1999-11-22 10:13:43 +01:00
|
|
|
MLINKS= grep.1 egrep.1 grep.1 fgrep.1
|
1993-07-06 20:45:26 +02:00
|
|
|
|
1999-11-22 10:13:43 +01:00
|
|
|
DPADD+= ${LIBGNUREGEX}
|
|
|
|
LDADD+= -lgnuregex
|
1995-01-11 06:07:00 +01:00
|
|
|
|
1997-12-20 19:46:09 +01:00
|
|
|
.if defined(GREP_LIBZ) && !empty(GREP_LIBZ)
|
1999-11-22 10:13:43 +01:00
|
|
|
LDADD+= -lz
|
|
|
|
DPADD+= ${LIBZ}
|
|
|
|
CFLAGS+=-DHAVE_LIBZ=1
|
|
|
|
LINKS+= ${BINDIR}/grep ${BINDIR}/zgrep \
|
1997-12-21 20:15:12 +01:00
|
|
|
${BINDIR}/grep ${BINDIR}/zegrep \
|
1999-11-22 10:13:43 +01:00
|
|
|
${BINDIR}/grep ${BINDIR}/zfgrep
|
|
|
|
MLINKS+=grep.1 zgrep.1 grep.1 zegrep.1 grep.1 zfgrep.1
|
1997-12-20 19:46:09 +01:00
|
|
|
.endif
|
1999-10-28 12:34:55 +02:00
|
|
|
|
2000-01-18 10:52:00 +01:00
|
|
|
SUBDIR+=doc
|
1999-11-22 10:13:43 +01:00
|
|
|
|
1993-07-08 18:18:59 +02:00
|
|
|
check: all
|
1999-11-22 10:13:43 +01:00
|
|
|
@failed=0; total=0; \
|
|
|
|
for tst in ${TESTS}; do \
|
|
|
|
total=$$(($$total+1)); \
|
1999-11-22 10:48:04 +01:00
|
|
|
if GREP=${.OBJDIR}/${PROG} srcdir=${.CURDIR}/tests \
|
|
|
|
${.CURDIR}/tests/$$tst; then \
|
1999-11-22 10:13:43 +01:00
|
|
|
echo "PASS: $$tst"; \
|
|
|
|
else \
|
|
|
|
failed=$$(($$failed+1)); \
|
|
|
|
echo "FAIL: $$tst"; \
|
|
|
|
fi; \
|
|
|
|
done; \
|
|
|
|
if [ "$$failed" -eq 0 ]; then \
|
|
|
|
echo "All $$total tests passed"; \
|
|
|
|
else \
|
|
|
|
echo "$$failed of $$total tests failed"; \
|
|
|
|
fi
|
|
|
|
|
|
|
|
TESTS= warning.sh khadafy.sh spencer1.sh bre.sh ere.sh status.sh empty.sh \
|
|
|
|
options.sh
|
1993-06-29 08:04:45 +02:00
|
|
|
|
|
|
|
.include <bsd.prog.mk>
|