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.3 (Berkeley) 07/09/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= 36 37all: ${ALL} 38 39egrep: egrep.c ${LIBC} 40 ${CC} -o $@ ${CFLAGS} egrep.c 41 42oegrep: oegrep.c ${LIBC} 43 ${CC} -o $@ ${CFLAGS} oegrep.c 44 45old.ucb.grep: ${LIBC} 46 ${CC} -o $@ ${CFLAGS} old.ucb.grep.c 47 48old.bin.grep: ${LIBC} 49 ${CC} -o $@ ${CFLAGS} old.bin.grep.c 50 51old.fgrep: ${LIBC} 52 ${CC} -o $@ ${CFLAGS} old.fgrep.c 53 54old.egrep: ${LIBC} 55 ${CC} -o $@ ${CFLAGS} old.egrep.c 56 57clean: FRC 58 rm -f ${OBJS} core ${ALL} old.egrep.c 59 60depend: FRC ${SRCS} 61 mkdep -p ${CFLAGS} ${SRCS} 62 63install: FRC 64 install -s -o bin -g bin -m 755 egrep ${DESTDIR}/usr/ucb/egrep 65 rm -f ${DESTDIR}/usr/ucb/fgrep ${DESTDIR}/usr/ucb/grep 66 ln ${DESTDIR}/usr/ucb/egrep ${DESTDIR}/usr/ucb/grep 67 ln ${DESTDIR}/usr/ucb/egrep ${DESTDIR}/usr/ucb/fgrep 68 install -s -o bin -g bin -m 755 old.bin.grep ${DESTDIR}/usr/lib/old.bin.grep 69 install -s -o bin -g bin -m 755 old.ucb.grep ${DESTDIR}/usr/lib/old.ucb.grep 70 install -s -o bin -g bin -m 755 old.fgrep ${DESTDIR}/usr/lib/old.fgrep 71 install -s -o bin -g bin -m 755 old.egrep ${DESTDIR}/usr/lib/old.egrep 72 73lint: FRC ${SRCS} 74 lint ${CFLAGS} ${SRCS} 75 76tags: FRC ${SRCS} 77 ctags ${SRCS} 78 79FRC: 80 81# DO NOT DELETE THIS LINE -- mkdep uses it. 82# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. 83 84egrep: egrep.c /usr/include/stdio.h /usr/include/ctype.h 85egrep: /usr/include/sys/types.h /usr/include/sys/stat.h /usr/include/sys/file.h 86egrep: /usr/include/regexp.h 87old.ucb.grep: old.ucb.grep.c /usr/include/stdio.h /usr/include/sys/types.h 88old.ucb.grep: /usr/include/sys/stat.h 89old.bin.grep: old.bin.grep.c /usr/include/sys/types.h /usr/include/sys/file.h 90old.bin.grep: /usr/include/sys/stat.h /usr/include/stdio.h /usr/include/ctype.h 91old.fgrep: old.fgrep.c /usr/include/stdio.h /usr/include/ctype.h 92old.fgrep: /usr/include/sys/param.h /usr/include/sys/types.h 93old.fgrep: /usr/include/signal.h /usr/include/machine/trap.h 94old.fgrep: /usr/include/machine/machparam.h /usr/include/sys/stat.h 95old.egrep: old.egrep.c /usr/include/stdio.h /usr/include/sys/types.h 96old.egrep: /usr/include/sys/stat.h /usr/include/ctype.h 97 98# IF YOU PUT ANYTHING HERE IT WILL GO AWAY 99