opnsense-src/gnu/usr.bin/grep/Makefile

57 lines
1.2 KiB
Makefile
Raw Normal View History

1999-08-27 19:37:10 -04:00
# $FreeBSD$
1999-02-09 12:23:03 -05:00
.include <src.opts.mk>
GREP_LIBZ=YES
.if ${MK_BSD_GREP} != "yes"
1993-06-29 02:04:45 -04:00
PROG= grep
.else
PROG= gnugrep
.endif
2004-07-04 06:05:37 -04:00
SRCS= closeout.c dfa.c error.c exclude.c grep.c grepmat.c hard-locale.c \
isdir.c kwset.c obstack.c quotearg.c savedir.c search.c xmalloc.c \
xstrtoumax.c
CLEANFILES+= gnugrep.1
1993-07-06 14:45:26 -04:00
CFLAGS+=-I${.CURDIR} -I${SYSROOT:U${DESTDIR}}/usr/include/gnu -DHAVE_CONFIG_H
.if ${MK_BSD_GREP} != "yes"
LINKS+= ${BINDIR}/grep ${BINDIR}/egrep \
${BINDIR}/grep ${BINDIR}/fgrep
MLINKS= grep.1 egrep.1 grep.1 fgrep.1
.endif
1993-07-06 14:45:26 -04:00
2014-11-25 16:18:18 -05:00
LIBADD= gnuregex bz2
2002-09-16 00:27:29 -04:00
.if defined(GREP_LIBZ) && !empty(GREP_LIBZ)
2014-11-25 16:18:18 -05:00
LIBADD+= z
CFLAGS+=-DHAVE_LIBZ=1
.endif
gnugrep.1: grep.1
${CP} ${.ALLSRC} ${.TARGET}
1999-10-28 06:34:55 -04:00
1993-07-08 12:18:59 -04:00
check: all
@failed=0; total=0; \
for tst in ${TESTS}; do \
total=$$(($$total+1)); \
1999-11-22 04:48:04 -05: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 \
2004-07-04 06:05:37 -04:00
options.sh backref.sh file.sh
1993-06-29 02:04:45 -04:00
.include <bsd.prog.mk>