summaryrefslogtreecommitdiffstats
path: root/rules
diff options
context:
space:
mode:
Diffstat (limited to 'rules')
-rw-r--r--rules/grep.in16
-rw-r--r--rules/grep.make14
2 files changed, 23 insertions, 7 deletions
diff --git a/rules/grep.in b/rules/grep.in
index ae738b3b1..afe426d1c 100644
--- a/rules/grep.in
+++ b/rules/grep.in
@@ -2,12 +2,22 @@
comment "BusyBox' grep is selected!"
depends on BUSYBOX_GREP
-config GREP
+menuconfig GREP
tristate
depends on !BUSYBOX_GREP || ALLYES
- select LIBPCRE
- prompt "grep"
+ select LIBPCRE if GREP_PCRE
+ prompt "grep "
help
GNUgrep searches one or more input files for lines
containing a match to a specified pattern. By default, grep
prints the matching lines.
+
+if GREP
+
+config GREP_PCRE
+ bool
+ prompt "pcre support"
+ help
+ Enable support for perl compatible regular expressions.
+
+endif
diff --git a/rules/grep.make b/rules/grep.make
index b5100fda2..38b1736ec 100644
--- a/rules/grep.make
+++ b/rules/grep.make
@@ -19,10 +19,10 @@ PACKAGES-$(PTXCONF_GREP) += grep
#
GREP_VERSION := 2.5.3
GREP := grep-$(GREP_VERSION)
-GREP_SUFFIX := tar.bz2
-GREP_URL := $(PTXCONF_SETUP_GNUMIRROR)/grep/$(GREP).$(GREP_SUFFIX)
-GREP_SOURCE := $(SRCDIR)/$(GREP).$(GREP_SUFFIX)
-GREP_DIR := $(BUILDDIR)/$(GREP)
+GREP_SUFFIX := tar.bz2
+GREP_URL := $(PTXCONF_SETUP_GNUMIRROR)/grep/$(GREP).$(GREP_SUFFIX)
+GREP_SOURCE := $(SRCDIR)/$(GREP).$(GREP_SUFFIX)
+GREP_DIR := $(BUILDDIR)/$(GREP)
# ----------------------------------------------------------------------------
# Get
@@ -55,6 +55,12 @@ GREP_ENV := $(CROSS_ENV)
#
GREP_AUTOCONF := $(CROSS_AUTOCONF_USR)
+ifdef PTXCONF_GREP_PCRE
+GREP_AUTOCONF += --enable-perl-regexp
+else
+GREP_AUTOCONF += --disable-perl-regexp
+endif
+
$(STATEDIR)/grep.prepare:
@$(call targetinfo)
@$(call clean, $(GREP_DIR)/config.cache)