2011-04-07 13:03:35 +00:00
|
|
|
# $NetBSD: Makefile,v 1.4 2011/02/16 01:31:33 joerg Exp $
|
Add BSD grep to the base system and make it our default grep.
Deliverables: Small and clean code (1,4 KSLOC vs GNU's 8,5 KSLOC),
lower memory usage than GNU grep, GNU compatibility,
BSD license.
TODO: Performance is somewhat behind GNU grep but it is only
significant for bigger searches. The reason is complex, the
most important factor is that GNU grep uses lots of
optimizations to improve the speed of the regex library.
First, we need a modern regex library (practically by adopting
TRE), add support for GNU-style non-standard regexes and then
reevalute the performance issues and look for bottlenecks. In
the meantime, for those, who need better performance, it is
possible to build GNU grep by setting WITH_GNU_GREP.
Approved by: delphij (mentor)
Obtained from: OpenBSD (http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/grep/),
freegrep (http://github.com/howardjp/freegrep)
Sponsored by: Google SoC 2008
Portbuild tests run by: kris, pav, erwin
Acknowledgements to: fjoe (as SoC 2008 mentor),
everyone who helped in reviewing and testing
2010-07-22 19:11:57 +00:00
|
|
|
# $FreeBSD$
|
|
|
|
# $OpenBSD: Makefile,v 1.6 2003/06/25 15:00:04 millert Exp $
|
|
|
|
|
2014-05-06 04:22:01 +00:00
|
|
|
.include <src.opts.mk>
|
2011-05-25 01:04:12 +00:00
|
|
|
|
|
|
|
.if ${MK_BSD_GREP} == "yes"
|
Add BSD grep to the base system and make it our default grep.
Deliverables: Small and clean code (1,4 KSLOC vs GNU's 8,5 KSLOC),
lower memory usage than GNU grep, GNU compatibility,
BSD license.
TODO: Performance is somewhat behind GNU grep but it is only
significant for bigger searches. The reason is complex, the
most important factor is that GNU grep uses lots of
optimizations to improve the speed of the regex library.
First, we need a modern regex library (practically by adopting
TRE), add support for GNU-style non-standard regexes and then
reevalute the performance issues and look for bottlenecks. In
the meantime, for those, who need better performance, it is
possible to build GNU grep by setting WITH_GNU_GREP.
Approved by: delphij (mentor)
Obtained from: OpenBSD (http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/grep/),
freegrep (http://github.com/howardjp/freegrep)
Sponsored by: Google SoC 2008
Portbuild tests run by: kris, pav, erwin
Acknowledgements to: fjoe (as SoC 2008 mentor),
everyone who helped in reviewing and testing
2010-07-22 19:11:57 +00:00
|
|
|
PROG= grep
|
2011-05-25 01:04:12 +00:00
|
|
|
.else
|
|
|
|
PROG= bsdgrep
|
2011-10-05 09:56:43 +00:00
|
|
|
CLEANFILES+= bsdgrep.1
|
|
|
|
|
|
|
|
bsdgrep.1: grep.1
|
2015-01-16 21:39:08 +00:00
|
|
|
${CP} ${.ALLSRC} ${.TARGET}
|
2011-05-25 01:04:12 +00:00
|
|
|
.endif
|
2011-10-05 09:56:43 +00:00
|
|
|
SRCS= file.c grep.c queue.c util.c
|
|
|
|
|
2017-04-21 14:36:09 +00:00
|
|
|
.if ${MK_BSD_GREP_FASTMATCH} == "yes"
|
|
|
|
# Extra files ported backported for some regex improvements
|
2011-10-05 09:56:43 +00:00
|
|
|
.PATH: ${.CURDIR}/regex
|
2017-04-04 16:08:51 +00:00
|
|
|
SRCS+= fastmatch.c hashtable.c tre-compile.c tre-fastmatch.c
|
2011-10-05 09:56:43 +00:00
|
|
|
CFLAGS+=-I${.CURDIR}/regex
|
2017-04-21 14:36:09 +00:00
|
|
|
.else
|
|
|
|
CFLAGS+= -DWITHOUT_FASTMATCH
|
|
|
|
.endif
|
2011-04-07 13:03:35 +00:00
|
|
|
|
2015-07-26 00:11:04 +00:00
|
|
|
CFLAGS.gcc+= --param max-inline-insns-single=500
|
|
|
|
|
2011-05-25 01:04:12 +00:00
|
|
|
.if ${MK_BSD_GREP} == "yes"
|
Add BSD grep to the base system and make it our default grep.
Deliverables: Small and clean code (1,4 KSLOC vs GNU's 8,5 KSLOC),
lower memory usage than GNU grep, GNU compatibility,
BSD license.
TODO: Performance is somewhat behind GNU grep but it is only
significant for bigger searches. The reason is complex, the
most important factor is that GNU grep uses lots of
optimizations to improve the speed of the regex library.
First, we need a modern regex library (practically by adopting
TRE), add support for GNU-style non-standard regexes and then
reevalute the performance issues and look for bottlenecks. In
the meantime, for those, who need better performance, it is
possible to build GNU grep by setting WITH_GNU_GREP.
Approved by: delphij (mentor)
Obtained from: OpenBSD (http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/grep/),
freegrep (http://github.com/howardjp/freegrep)
Sponsored by: Google SoC 2008
Portbuild tests run by: kris, pav, erwin
Acknowledgements to: fjoe (as SoC 2008 mentor),
everyone who helped in reviewing and testing
2010-07-22 19:11:57 +00:00
|
|
|
LINKS= ${BINDIR}/grep ${BINDIR}/egrep \
|
|
|
|
${BINDIR}/grep ${BINDIR}/fgrep \
|
2017-04-04 05:56:42 +00:00
|
|
|
${BINDIR}/grep ${BINDIR}/rgrep \
|
Add BSD grep to the base system and make it our default grep.
Deliverables: Small and clean code (1,4 KSLOC vs GNU's 8,5 KSLOC),
lower memory usage than GNU grep, GNU compatibility,
BSD license.
TODO: Performance is somewhat behind GNU grep but it is only
significant for bigger searches. The reason is complex, the
most important factor is that GNU grep uses lots of
optimizations to improve the speed of the regex library.
First, we need a modern regex library (practically by adopting
TRE), add support for GNU-style non-standard regexes and then
reevalute the performance issues and look for bottlenecks. In
the meantime, for those, who need better performance, it is
possible to build GNU grep by setting WITH_GNU_GREP.
Approved by: delphij (mentor)
Obtained from: OpenBSD (http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/grep/),
freegrep (http://github.com/howardjp/freegrep)
Sponsored by: Google SoC 2008
Portbuild tests run by: kris, pav, erwin
Acknowledgements to: fjoe (as SoC 2008 mentor),
everyone who helped in reviewing and testing
2010-07-22 19:11:57 +00:00
|
|
|
${BINDIR}/grep ${BINDIR}/zgrep \
|
|
|
|
${BINDIR}/grep ${BINDIR}/zegrep \
|
2011-11-28 20:16:55 +00:00
|
|
|
${BINDIR}/grep ${BINDIR}/zfgrep
|
Add BSD grep to the base system and make it our default grep.
Deliverables: Small and clean code (1,4 KSLOC vs GNU's 8,5 KSLOC),
lower memory usage than GNU grep, GNU compatibility,
BSD license.
TODO: Performance is somewhat behind GNU grep but it is only
significant for bigger searches. The reason is complex, the
most important factor is that GNU grep uses lots of
optimizations to improve the speed of the regex library.
First, we need a modern regex library (practically by adopting
TRE), add support for GNU-style non-standard regexes and then
reevalute the performance issues and look for bottlenecks. In
the meantime, for those, who need better performance, it is
possible to build GNU grep by setting WITH_GNU_GREP.
Approved by: delphij (mentor)
Obtained from: OpenBSD (http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/grep/),
freegrep (http://github.com/howardjp/freegrep)
Sponsored by: Google SoC 2008
Portbuild tests run by: kris, pav, erwin
Acknowledgements to: fjoe (as SoC 2008 mentor),
everyone who helped in reviewing and testing
2010-07-22 19:11:57 +00:00
|
|
|
|
|
|
|
MLINKS= grep.1 egrep.1 \
|
|
|
|
grep.1 fgrep.1 \
|
2017-04-04 05:56:42 +00:00
|
|
|
grep.1 rgrep.1 \
|
Add BSD grep to the base system and make it our default grep.
Deliverables: Small and clean code (1,4 KSLOC vs GNU's 8,5 KSLOC),
lower memory usage than GNU grep, GNU compatibility,
BSD license.
TODO: Performance is somewhat behind GNU grep but it is only
significant for bigger searches. The reason is complex, the
most important factor is that GNU grep uses lots of
optimizations to improve the speed of the regex library.
First, we need a modern regex library (practically by adopting
TRE), add support for GNU-style non-standard regexes and then
reevalute the performance issues and look for bottlenecks. In
the meantime, for those, who need better performance, it is
possible to build GNU grep by setting WITH_GNU_GREP.
Approved by: delphij (mentor)
Obtained from: OpenBSD (http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/grep/),
freegrep (http://github.com/howardjp/freegrep)
Sponsored by: Google SoC 2008
Portbuild tests run by: kris, pav, erwin
Acknowledgements to: fjoe (as SoC 2008 mentor),
everyone who helped in reviewing and testing
2010-07-22 19:11:57 +00:00
|
|
|
grep.1 zgrep.1 \
|
|
|
|
grep.1 zegrep.1 \
|
2015-01-30 18:07:46 +00:00
|
|
|
grep.1 zfgrep.1
|
2011-05-25 01:04:12 +00:00
|
|
|
.endif
|
|
|
|
|
2014-11-25 14:29:10 +00:00
|
|
|
LIBADD= z
|
2013-01-08 18:37:12 +00:00
|
|
|
|
2014-04-01 14:24:32 +00:00
|
|
|
.if ${MK_LZMA_SUPPORT} != "no"
|
2014-11-25 14:29:10 +00:00
|
|
|
LIBADD+= lzma
|
2013-01-08 18:37:12 +00:00
|
|
|
|
2015-06-08 23:37:17 +00:00
|
|
|
.if ${MK_BSD_GREP} == "yes"
|
2011-11-28 20:16:55 +00:00
|
|
|
LINKS+= ${BINDIR}/${PROG} ${BINDIR}/xzgrep \
|
|
|
|
${BINDIR}/${PROG} ${BINDIR}/xzegrep \
|
|
|
|
${BINDIR}/${PROG} ${BINDIR}/xzfgrep \
|
|
|
|
${BINDIR}/${PROG} ${BINDIR}/lzgrep \
|
|
|
|
${BINDIR}/${PROG} ${BINDIR}/lzegrep \
|
|
|
|
${BINDIR}/${PROG} ${BINDIR}/lzfgrep
|
2015-01-30 18:07:46 +00:00
|
|
|
|
|
|
|
MLINKS+= grep.1 xzgrep.1 \
|
|
|
|
grep.1 xzegrep.1 \
|
|
|
|
grep.1 xzfgrep.1 \
|
|
|
|
grep.1 lzgrep.1 \
|
|
|
|
grep.1 lzegrep.1 \
|
|
|
|
grep.1 lzfgrep.1
|
2015-06-08 23:37:17 +00:00
|
|
|
.endif
|
2013-01-08 18:37:12 +00:00
|
|
|
.else
|
|
|
|
CFLAGS+= -DWITHOUT_LZMA
|
|
|
|
.endif
|
2011-11-28 20:16:55 +00:00
|
|
|
|
2014-04-01 14:24:32 +00:00
|
|
|
.if ${MK_BZIP2_SUPPORT} != "no"
|
2014-11-25 14:29:10 +00:00
|
|
|
LIBADD+= bz2
|
2011-10-11 22:27:23 +00:00
|
|
|
|
2011-10-23 16:04:07 +00:00
|
|
|
.if ${MK_BSD_GREP} == "yes"
|
2011-10-11 22:27:23 +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
|
2011-10-23 16:04:07 +00:00
|
|
|
.endif
|
2011-10-11 22:27:23 +00:00
|
|
|
.else
|
|
|
|
CFLAGS+= -DWITHOUT_BZIP2
|
|
|
|
.endif
|
Add BSD grep to the base system and make it our default grep.
Deliverables: Small and clean code (1,4 KSLOC vs GNU's 8,5 KSLOC),
lower memory usage than GNU grep, GNU compatibility,
BSD license.
TODO: Performance is somewhat behind GNU grep but it is only
significant for bigger searches. The reason is complex, the
most important factor is that GNU grep uses lots of
optimizations to improve the speed of the regex library.
First, we need a modern regex library (practically by adopting
TRE), add support for GNU-style non-standard regexes and then
reevalute the performance issues and look for bottlenecks. In
the meantime, for those, who need better performance, it is
possible to build GNU grep by setting WITH_GNU_GREP.
Approved by: delphij (mentor)
Obtained from: OpenBSD (http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/grep/),
freegrep (http://github.com/howardjp/freegrep)
Sponsored by: Google SoC 2008
Portbuild tests run by: kris, pav, erwin
Acknowledgements to: fjoe (as SoC 2008 mentor),
everyone who helped in reviewing and testing
2010-07-22 19:11:57 +00:00
|
|
|
|
2014-04-01 14:24:32 +00:00
|
|
|
.if ${MK_GNU_GREP_COMPAT} != "no"
|
2017-06-19 20:47:24 +00:00
|
|
|
CFLAGS+= -I${SYSROOT:U${DESTDIR}}/usr/include/gnu -DWITH_GNU
|
2014-11-25 14:29:10 +00:00
|
|
|
LIBADD+= gnuregex
|
Add BSD grep to the base system and make it our default grep.
Deliverables: Small and clean code (1,4 KSLOC vs GNU's 8,5 KSLOC),
lower memory usage than GNU grep, GNU compatibility,
BSD license.
TODO: Performance is somewhat behind GNU grep but it is only
significant for bigger searches. The reason is complex, the
most important factor is that GNU grep uses lots of
optimizations to improve the speed of the regex library.
First, we need a modern regex library (practically by adopting
TRE), add support for GNU-style non-standard regexes and then
reevalute the performance issues and look for bottlenecks. In
the meantime, for those, who need better performance, it is
possible to build GNU grep by setting WITH_GNU_GREP.
Approved by: delphij (mentor)
Obtained from: OpenBSD (http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/grep/),
freegrep (http://github.com/howardjp/freegrep)
Sponsored by: Google SoC 2008
Portbuild tests run by: kris, pav, erwin
Acknowledgements to: fjoe (as SoC 2008 mentor),
everyone who helped in reviewing and testing
2010-07-22 19:11:57 +00:00
|
|
|
.endif
|
|
|
|
|
2014-04-01 14:24:32 +00:00
|
|
|
.if ${MK_NLS} != "no"
|
Add BSD grep to the base system and make it our default grep.
Deliverables: Small and clean code (1,4 KSLOC vs GNU's 8,5 KSLOC),
lower memory usage than GNU grep, GNU compatibility,
BSD license.
TODO: Performance is somewhat behind GNU grep but it is only
significant for bigger searches. The reason is complex, the
most important factor is that GNU grep uses lots of
optimizations to improve the speed of the regex library.
First, we need a modern regex library (practically by adopting
TRE), add support for GNU-style non-standard regexes and then
reevalute the performance issues and look for bottlenecks. In
the meantime, for those, who need better performance, it is
possible to build GNU grep by setting WITH_GNU_GREP.
Approved by: delphij (mentor)
Obtained from: OpenBSD (http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/grep/),
freegrep (http://github.com/howardjp/freegrep)
Sponsored by: Google SoC 2008
Portbuild tests run by: kris, pav, erwin
Acknowledgements to: fjoe (as SoC 2008 mentor),
everyone who helped in reviewing and testing
2010-07-22 19:11:57 +00:00
|
|
|
.include "${.CURDIR}/nls/Makefile.inc"
|
|
|
|
.else
|
|
|
|
CFLAGS+= -DWITHOUT_NLS
|
|
|
|
.endif
|
|
|
|
|
2017-08-02 08:35:51 +00:00
|
|
|
SUBDIR.${MK_TESTS}+= tests
|
2014-10-09 01:53:23 +00:00
|
|
|
|
Add BSD grep to the base system and make it our default grep.
Deliverables: Small and clean code (1,4 KSLOC vs GNU's 8,5 KSLOC),
lower memory usage than GNU grep, GNU compatibility,
BSD license.
TODO: Performance is somewhat behind GNU grep but it is only
significant for bigger searches. The reason is complex, the
most important factor is that GNU grep uses lots of
optimizations to improve the speed of the regex library.
First, we need a modern regex library (practically by adopting
TRE), add support for GNU-style non-standard regexes and then
reevalute the performance issues and look for bottlenecks. In
the meantime, for those, who need better performance, it is
possible to build GNU grep by setting WITH_GNU_GREP.
Approved by: delphij (mentor)
Obtained from: OpenBSD (http://www.openbsd.org/cgi-bin/cvsweb/src/usr.bin/grep/),
freegrep (http://github.com/howardjp/freegrep)
Sponsored by: Google SoC 2008
Portbuild tests run by: kris, pav, erwin
Acknowledgements to: fjoe (as SoC 2008 mentor),
everyone who helped in reviewing and testing
2010-07-22 19:11:57 +00:00
|
|
|
.include <bsd.prog.mk>
|