1999-02-09 17:23:03 +00:00
|
|
|
# $Id: Makefile,v 1.14 1998/11/14 23:37:32 wosch Exp $
|
|
|
|
|
|
|
|
MAINTAINER= wosch
|
1997-12-20 18:46:09 +00:00
|
|
|
|
|
|
|
GREP_LIBZ= YES
|
|
|
|
GREP_FTS= YES
|
|
|
|
|
1993-06-29 06:04:45 +00:00
|
|
|
PROG= grep
|
1995-01-11 05:07:00 +00:00
|
|
|
SRCS= dfa.c grep.c getopt.c kwset.c obstack.c search.c
|
1993-07-06 18:45:26 +00:00
|
|
|
CFLAGS+=-DGREP -DHAVE_STRING_H=1 -DHAVE_SYS_PARAM_H=1 -DHAVE_UNISTD_H=1 \
|
|
|
|
-DHAVE_GETPAGESIZE=1 -DHAVE_MEMCHR=1 -DHAVE_STRERROR=1 \
|
1998-11-14 23:37:32 +00:00
|
|
|
-DHAVE_VALLOC=1 -DHAVE_WORKING_MMAP=1
|
1993-07-06 18:45:26 +00:00
|
|
|
|
1993-07-16 17:48:38 +00:00
|
|
|
LINKS+= ${BINDIR}/grep ${BINDIR}/egrep \
|
|
|
|
${BINDIR}/grep ${BINDIR}/fgrep
|
1993-07-08 16:18:59 +00:00
|
|
|
MLINKS= grep.1 egrep.1 grep.1 fgrep.1
|
1993-07-06 18:45:26 +00:00
|
|
|
|
1995-01-11 05:07:00 +00:00
|
|
|
DPADD+= ${LIBGNUREGEX}
|
|
|
|
LDADD+= -lgnuregex
|
|
|
|
|
1997-12-20 18:46:09 +00:00
|
|
|
.if defined(GREP_LIBZ) && !empty(GREP_LIBZ)
|
|
|
|
LDADD+= -lz
|
|
|
|
DPADD+= ${LIBZ}
|
|
|
|
CFLAGS+= -DHAVE_LIBZ=1
|
1997-12-21 19:15:12 +00:00
|
|
|
LINKS+= ${BINDIR}/grep ${BINDIR}/zgrep \
|
|
|
|
${BINDIR}/grep ${BINDIR}/zegrep \
|
|
|
|
${BINDIR}/grep ${BINDIR}/zfgrep
|
1998-10-02 07:14:32 +00:00
|
|
|
MLINKS+= grep.1 zgrep.1 grep.1 zegrep.1 grep.1 zfgrep.1
|
1997-12-20 18:46:09 +00:00
|
|
|
.endif
|
|
|
|
.if defined(GREP_FTS) && !empty(GREP_FTS)
|
|
|
|
CFLAGS+= -DHAVE_FTS=1
|
|
|
|
.endif
|
|
|
|
|
1993-07-08 16:18:59 +00:00
|
|
|
check: all
|
|
|
|
sh ${.CURDIR}/tests/check.sh ${.CURDIR}/tests
|
1993-06-29 06:04:45 +00:00
|
|
|
|
|
|
|
.include <bsd.prog.mk>
|