Print this page
8858 /usr/bin/grep doesn't support -E option
4580 /usr/bin/grep can't handle multibyte characters
8929 8868 tests are not delivered with system/test/utiltest
8860 Example in grep(1) is incorrect
Reviewed by: Peter Tribble <peter.tribble@gmail.com>
Reviewed by: Toomas Soome <tsoome@me.com>
Reviewed by: Yuri Pankov <yuripv@gmx.com>

@@ -18,30 +18,58 @@
 # information: Portions Copyright [yyyy] [name of copyright owner]
 #
 # CDDL HEADER END
 #
 #
-#ident  "%Z%%M% %I%     %E% SMI"
-#
-# Copyright (c) 1989,1996, by Sun Microsystems, Inc.
-# All rights reserved.
+# Copyright 2004 Sun Microsystems, Inc.  All rights reserved.
+# Use is subject to license terms.
 #
 
 PROG= grep 
+FFILE= fgrep
+EFILE= egrep
 
 include ../Makefile.cmd
 
+CERRWARN += -_gcc=-Wno-parentheses
+CERRWARN += -_gcc=-Wno-uninitialized
+
+ROOTXPG4LINKS = $(ROOTXPG4BIN)/$(FFILE) $(ROOTXPG4BIN)/$(EFILE) $(ROOTXPG4BIN)/$(PROG)
+ROOTLINKS = $(ROOTBIN)/$(FFILE) $(ROOTBIN)/$(EFILE)
+
+CFLAGS += $(CCVERBOSE)
 CPPFLAGS += -D_FILE_OFFSET_BITS=64
-LDLIBS += -lgen
-XGETFLAGS += -a -x grep.xcl
 
+POFILE= grep_xpg4.po
+POFILES= grep.po
 
 .KEEP_STATE:
 
 all: $(PROG) 
 
-install: all $(ROOTPROG)
+install: all $(ROOTPROG) $(ROOTLINKS) $(ROOTXPG4LINKS)
+
+$(ROOTLINKS):   $(ROOTPROG)
+        -$(RM) $@
+        -$(LN) $(ROOTPROG) $@
+
+$(ROOTXPG4LINKS):       $(ROOTPROG)
+        -$(RM) $@
+        -$(SYMLINK) ../../bin/grep $@
+
+$(POFILE): $(POFILES)
+        $(RM) $@
+        $(CP) $(POFILES) $@
+
+# Make the links locally for test purposes
+test:   $(FFILE) $(EFILE)
+
+$(FFILE):      $(PROG)
+                @$(RM) $(FFILE); $(LN) $(PROG) $(FFILE)
+
+$(EFILE):      $(PROG)
+                @$(RM) $(EFILE); $(LN) $(PROG) $(EFILE)
 
 clean:
 
 lint:   lint_PROG