1# 2# Copyright (c) 1987 Regents of the University of California. 3# All rights reserved. 4# 5# Redistribution and use in source and binary forms are permitted 6# provided that the above copyright notice and this paragraph are 7# duplicated in all such forms and that any documentation, 8# advertising materials, and other materials related to such 9# distribution and use acknowledge that the software was developed 10# by the University of California, Berkeley. The name of the 11# University may not be used to endorse or promote products derived 12# from this software without specific prior written permission. 13# THIS SOFTWARE IS PROVIDED ``AS IS'' AND WITHOUT ANY EXPRESS OR 14# IMPLIED WARRANTIES, INCLUDING, WITHOUT LIMITATION, THE IMPLIED 15# WARRANTIES OF MERCHANTIBILITY AND FITNESS FOR A PARTICULAR PURPOSE. 16# 17# @(#)Makefile 5.4 (Berkeley) 10/25/88 18# 19# 20# -DEGREPSTD=path location of std egrep (normally /usr/bin/egrep). 21# -DGREPSTD=path location of std grep (normally /bin/grep). 22# -DFGREPSTD=path location of std fgrep (normally /usr/bin/fgrep). 23# -Dstrrchr=rindex, -Dstrchr=index for troglodytes. 24# -DSLOWSYS invoke xread() for system time quirk on PDP, others? 25# -DNOKANJI default is for Japanese Unix. undef only for raw 26# parity-marked search capability, not standard w/grep. 27# -DCHINESE for systems using EUC Chinese2 codes 28 29CFLAGS= -O -Dstrrchr=rindex -Dstrchr=index -DNOKANJI \ 30 -DEGREPSTD=\"/usr/lib/old.egrep\" -DGREPSTD=\"/usr/lib/old.bin.grep\" \ 31 -DFGREPSTD=\"/usr/lib/old.fgrep\" 32LIBC= /lib/libc.a 33ALL= egrep old.ucb.grep old.bin.grep old.fgrep old.egrep 34SRCS= egrep.c old.ucb.grep.c old.bin.grep.c old.fgrep.c old.egrep.c 35OBJS= 36MAN= grep.0 37 38all: ${ALL} 39 40egrep oegrep old.ucb.grep old.bin.grep old.fgrep old.egrep: ${LIBC} 41 ${CC} -o $@ ${CFLAGS} $@.c 42 43clean: 44 rm -f ${OBJS} core ${ALL} old.egrep.c 45 46cleandir: clean 47 rm -f ${MAN} tags .depend 48 49depend: ${SRCS} 50 mkdep -p ${CFLAGS} ${SRCS} 51 52install: ${MAN} 53 install -s -o bin -g bin -m 755 egrep ${DESTDIR}/usr/ucb/egrep 54 rm -f ${DESTDIR}/usr/ucb/fgrep ${DESTDIR}/usr/ucb/grep 55 ln ${DESTDIR}/usr/ucb/egrep ${DESTDIR}/usr/ucb/grep 56 ln ${DESTDIR}/usr/ucb/egrep ${DESTDIR}/usr/ucb/fgrep 57 install -s -o bin -g bin -m 755 old.bin.grep ${DESTDIR}/usr/lib/old.bin.grep 58 install -s -o bin -g bin -m 755 old.ucb.grep ${DESTDIR}/usr/lib/old.ucb.grep 59 install -s -o bin -g bin -m 755 old.fgrep ${DESTDIR}/usr/lib/old.fgrep 60 install -s -o bin -g bin -m 755 old.egrep ${DESTDIR}/usr/lib/old.egrep 61 install -c -o bin -g bin -m 444 ${MAN} ${DESTDIR}/usr/man/cat1 62 rm -f ${DESTDIR}/usr/man/cat1/egrep.0 63 rm -f ${DESTDIR}/usr/man/cat1/fgrep.0 64 ln ${DESTDIR}/usr/man/cat1/grep.0 ${DESTDIR}/usr/man/cat1/egrep.0 65 ln ${DESTDIR}/usr/man/cat1/grep.0 ${DESTDIR}/usr/man/cat1/fgrep.0 66 67lint: ${SRCS} 68 lint ${CFLAGS} ${SRCS} 69 70tags: ${SRCS} 71 ctags ${SRCS} 72 73FRC: 74