# # Copyright (c) 1987 Regents of the University of California. # All rights reserved. # # Redistribution and use in source and binary forms are permitted # provided that the above copyright notice and this paragraph are # duplicated in all such forms and that any documentation, # advertising materials, and other materials related to such # distribution and use acknowledge that the software was developed # by the University of California, Berkeley. The name of the # University may not be used to endorse or promote products derived # from this software without specific prior written permission. # THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR # IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED # WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. # # @(#)Makefile 5.4 (Berkeley) %G% # # # -DEGREPSTD=path location of std egrep (normally /usr/bin/egrep). # -DGREPSTD=path location of std grep (normally /bin/grep). # -DFGREPSTD=path location of std fgrep (normally /usr/bin/fgrep). # -Dstrrchr=rindex, -Dstrchr=index for troglodytes. # -DSLOWSYS invoke xread() for system time quirk on PDP, others? # -DNOKANJI default is for Japanese Unix. undef only for raw # parity-marked search capability, not standard w/grep. # -DCHINESE for systems using EUC Chinese2 codes CFLAGS= -O -Dstrrchr=rindex -Dstrchr=index -DNOKANJI \ -DEGREPSTD=\"/usr/lib/old.egrep\" -DGREPSTD=\"/usr/lib/old.bin.grep\" \ -DFGREPSTD=\"/usr/lib/old.fgrep\" LIBC= /lib/libc.a ALL= egrep old.ucb.grep old.bin.grep old.fgrep old.egrep SRCS= egrep.c old.ucb.grep.c old.bin.grep.c old.fgrep.c old.egrep.c OBJS= MAN= grep.0 all: ${ALL} egrep oegrep old.ucb.grep old.bin.grep old.fgrep old.egrep: ${LIBC} ${CC} -o $@ ${CFLAGS} $@.c clean: rm -f ${OBJS} core ${ALL} old.egrep.c cleandir: clean rm -f ${MAN} tags .depend depend: ${SRCS} mkdep -p ${CFLAGS} ${SRCS} install: ${MAN} install -s -o bin -g bin -m 755 egrep ${DESTDIR}/usr/ucb/egrep rm -f ${DESTDIR}/usr/ucb/fgrep ${DESTDIR}/usr/ucb/grep ln ${DESTDIR}/usr/ucb/egrep ${DESTDIR}/usr/ucb/grep ln ${DESTDIR}/usr/ucb/egrep ${DESTDIR}/usr/ucb/fgrep install -s -o bin -g bin -m 755 old.bin.grep ${DESTDIR}/usr/lib/old.bin.grep install -s -o bin -g bin -m 755 old.ucb.grep ${DESTDIR}/usr/lib/old.ucb.grep install -s -o bin -g bin -m 755 old.fgrep ${DESTDIR}/usr/lib/old.fgrep install -s -o bin -g bin -m 755 old.egrep ${DESTDIR}/usr/lib/old.egrep install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1 rm -f ${DESTDIR}/usr/man/cat1/egrep.0 rm -f ${DESTDIR}/usr/man/cat1/fgrep.0 ln ${DESTDIR}/usr/man/cat1/grep.0 ${DESTDIR}/usr/man/cat1/egrep.0 ln ${DESTDIR}/usr/man/cat1/grep.0 ${DESTDIR}/usr/man/cat1/fgrep.0 lint: ${SRCS} lint ${CFLAGS} ${SRCS} tags: ${SRCS} ctags ${SRCS} FRC: