freebsd-skq/gnu/usr.bin/grep/Makefile

56 lines
1.3 KiB
Makefile
Raw Normal View History

1999-08-27 23:37:10 +00:00
# $FreeBSD$
1999-02-09 17:23:03 +00:00
GREP_LIBZ=YES
1993-06-29 06:04:45 +00:00
PROG= grep
2004-03-01 08:37:20 +00:00
SRCS= dfa.c grep.c grepmat.c kwset.c obstack.c savedir.c search.c
1993-07-06 18:45:26 +00:00
CFLAGS+=-I${.CURDIR} -I${DESTDIR}/usr/include/gnu -DHAVE_CONFIG_H
LINKS+= ${BINDIR}/grep ${BINDIR}/egrep \
${BINDIR}/grep ${BINDIR}/fgrep
MLINKS= grep.1 egrep.1 grep.1 fgrep.1
1993-07-06 18:45:26 +00:00
DPADD= ${LIBGNUREGEX} ${LIBBZ2}
LDADD= -lgnuregex -lbz2
2002-09-16 04:27:29 +00:00
LINKS+= ${BINDIR}/grep ${BINDIR}/bzgrep \
${BINDIR}/grep ${BINDIR}/bzegrep \
${BINDIR}/grep ${BINDIR}/bzfgrep
MLINKS+=grep.1 bzgrep.1 grep.1 bzegrep.1 grep.1 bzfgrep.1
1995-01-11 05:07:00 +00:00
.if defined(GREP_LIBZ) && !empty(GREP_LIBZ)
LDADD+= -lz
DPADD+= ${LIBZ}
CFLAGS+=-DHAVE_LIBZ=1
LINKS+= ${BINDIR}/grep ${BINDIR}/zgrep \
${BINDIR}/grep ${BINDIR}/zegrep \
${BINDIR}/grep ${BINDIR}/zfgrep
MLINKS+=grep.1 zgrep.1 grep.1 zegrep.1 grep.1 zfgrep.1
.endif
1999-10-28 10:34:55 +00:00
SUBDIR+=doc
1993-07-08 16:18:59 +00:00
check: all
@failed=0; total=0; \
for tst in ${TESTS}; do \
total=$$(($$total+1)); \
1999-11-22 09:48:04 +00:00
if GREP=${.OBJDIR}/${PROG} srcdir=${.CURDIR}/tests \
${.CURDIR}/tests/$$tst; then \
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 06:04:45 +00:00
.include <bsd.prog.mk>