aboutsummaryrefslogtreecommitdiff
path: root/toys/posix
diff options
context:
space:
mode:
authorRob Landley <rob@landley.net>2015-02-14 14:59:30 -0600
committerRob Landley <rob@landley.net>2015-02-14 14:59:30 -0600
commitc49b9a97559d2009e9076e063b2e9acbc13fb9ef (patch)
tree84fb9ddb329e7290efbe12d0bccb627943381efc /toys/posix
parent55fc1603b4162786565106e703da14106295171e (diff)
downloadtoybox-c49b9a97559d2009e9076e063b2e9acbc13fb9ef.tar.gz
Make egrep and fgrep build standalone.
Diffstat (limited to 'toys/posix')
-rw-r--r--toys/posix/grep.c14
1 files changed, 12 insertions, 2 deletions
diff --git a/toys/posix/grep.c b/toys/posix/grep.c
index 18a27e3e..61df08ea 100644
--- a/toys/posix/grep.c
+++ b/toys/posix/grep.c
@@ -5,8 +5,8 @@
* See http://pubs.opengroup.org/onlinepubs/9699919799/utilities/grep.html
USE_GREP(NEWTOY(grep, "ZzEFHabhinorsvwclqe*f*m#x[!wx][!EFw]", TOYFLAG_BIN))
-USE_GREP(OLDTOY(egrep, grep, TOYFLAG_BIN))
-USE_GREP(OLDTOY(fgrep, grep, TOYFLAG_BIN))
+USE_EGREP(OLDTOY(egrep, grep, TOYFLAG_BIN))
+USE_FGREP(OLDTOY(fgrep, grep, TOYFLAG_BIN))
config GREP
bool "grep"
@@ -36,6 +36,16 @@ config GREP
output prefix (default: filename if checking more than 1 file)
-H force filename -b byte offset of match
-h hide filename -n line number of match
+
+config EGREP
+ bool
+ default y
+ depends on GREP
+
+config FGREP
+ bool
+ default y
+ depends on GREP
*/
#define FOR_grep