1# $FreeBSD$ 2 3MAINTAINER= wosch 4 5GREP_LIBZ= YES 6GREP_FTS= YES 7 8PROG= grep 9SRCS= dfa.c grep.c getopt.c getopt1.c kwset.c obstack.c savedir.c search.c \ 10 stpcpy.c 11CFLAGS+=-DGREP -DHAVE_STRING_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_UNISTD_H=1 \ 12 -DHAVE_GETPAGESIZE=1 -DHAVE_MEMCHR=1 -DHAVE_STRERROR=1 \ 13 -DHAVE_VALLOC=1 -DHAVE_WORKING_MMAP=1 -DVERSION=\"2.3\" -DHAVE_DIRENT_H 14 15LINKS+= ${BINDIR}/grep ${BINDIR}/egrep \ 16 ${BINDIR}/grep ${BINDIR}/fgrep 17MLINKS= grep.1 egrep.1 grep.1 fgrep.1 18 19DPADD+= ${LIBGNUREGEX} 20LDADD+= -lgnuregex 21 22.if defined(GREP_LIBZ) && !empty(GREP_LIBZ) 23LDADD+= -lz 24DPADD+= ${LIBZ} 25CFLAGS+= -DHAVE_LIBZ=1 26LINKS+= ${BINDIR}/grep ${BINDIR}/zgrep \ 27 ${BINDIR}/grep ${BINDIR}/zegrep \ 28 ${BINDIR}/grep ${BINDIR}/zfgrep 29MLINKS+= grep.1 zgrep.1 grep.1 zegrep.1 grep.1 zfgrep.1 30.endif 31.if defined(GREP_FTS) && !empty(GREP_FTS) 32CFLAGS+= -DHAVE_FTS=1 33.endif 34 35check: all 36 sh ${.CURDIR}/tests/check.sh ${.CURDIR}/tests 37 38.include <bsd.prog.mk> 39