rationalized handling of child processes, cleaned up mail1 some more
[unix-history] / usr / src / usr.bin / grep / Makefile
CommitLineData
8a9469a5
KB
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 this notice is preserved and that due credit is given
7# to the University of California at Berkeley. The name of the University
8# may not be used to endorse or promote products derived from this
9# software without specific prior written permission. This software
10# is provided ``as is'' without express or implied warranty.
11#
a100f120 12# @(#)Makefile 5.2 (Berkeley) %G%
8a9469a5
KB
13#
14# -DEGREPSTD=path location of std egrep (normally /usr/bin/egrep).
15# -DGREPSTD=path location of std grep (normally /bin/grep).
16# -DFGREPSTD=path location of std fgrep (normally /usr/bin/fgrep).
17# -Dstrrchr=rindex, -Dstrchr=index for troglodytes.
18# -DSLOWSYS invoke xread() for system time quirk on PDP, others?
19# -DNOKANJI default is for Japanese Unix. undef only for raw
20# parity-marked search capability, not standard w/grep.
21# -DCHINESE for systems using EUC Chinese2 codes
22
a100f120 23CFLAGS= -O -Dstrrchr=rindex -Dstrchr=index -DNOKANJI \
8a9469a5
KB
24 -DEGREPSTD=\"/usr/lib/old.egrep\" -DGREPSTD=\"/usr/lib/old.bin.grep\" \
25 -DFGREPSTD=\"/usr/lib/old.fgrep\"
26LIBC= /lib/libc.a
27ALL= egrep old.ucb.grep old.bin.grep old.fgrep old.egrep
28SRCS= egrep.c old.ucb.grep.c old.bin.grep.c old.fgrep.c old.egrep.c
29OBJS=
30
31all: ${ALL}
32
33egrep: egrep.c ${LIBC}
34 ${CC} -o $@ ${CFLAGS} egrep.c
35
36oegrep: oegrep.c ${LIBC}
37 ${CC} -o $@ ${CFLAGS} oegrep.c
38
39old.ucb.grep: ${LIBC}
40 ${CC} -o $@ ${CFLAGS} old.ucb.grep.c
41
42old.bin.grep: ${LIBC}
43 ${CC} -o $@ ${CFLAGS} old.bin.grep.c
44
45old.fgrep: ${LIBC}
46 ${CC} -o $@ ${CFLAGS} old.fgrep.c
47
48old.egrep: ${LIBC}
49 ${CC} -o $@ ${CFLAGS} old.egrep.c
50
51clean: FRC
52 rm -f ${OBJS} core ${ALL} old.egrep.c
53
54depend: FRC ${SRCS}
55 mkdep -p ${CFLAGS} ${SRCS}
56
57install: FRC
58 install -s -o bin -g bin -m 755 egrep ${DESTDIR}/usr/ucb/egrep
59 rm -f ${DESTDIR}/usr/ucb/fgrep ${DESTDIR}/usr/ucb/grep
60 ln ${DESTDIR}/usr/ucb/egrep ${DESTDIR}/usr/ucb/grep
61 ln ${DESTDIR}/usr/ucb/egrep ${DESTDIR}/usr/ucb/fgrep
62 install -s -o bin -g bin -m 755 old.bin.grep ${DESTDIR}/usr/lib/old.bin.grep
63 install -s -o bin -g bin -m 755 old.ucb.grep ${DESTDIR}/usr/lib/old.ucb.grep
64 install -s -o bin -g bin -m 755 old.fgrep ${DESTDIR}/usr/lib/old.fgrep
65 install -s -o bin -g bin -m 755 old.egrep ${DESTDIR}/usr/lib/old.egrep
66
67lint: FRC ${SRCS}
68 lint ${CFLAGS} ${SRCS}
69
70tags: FRC ${SRCS}
71 ctags ${SRCS}
72
73FRC:
74
75# DO NOT DELETE THIS LINE -- mkdep uses it.
76# DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY.
77
78egrep: egrep.c /usr/include/stdio.h /usr/include/ctype.h
79egrep: /usr/include/sys/types.h /usr/include/sys/stat.h /usr/include/sys/file.h
80egrep: /usr/include/regexp.h
81old.ucb.grep: old.ucb.grep.c /usr/include/stdio.h /usr/include/sys/types.h
82old.ucb.grep: /usr/include/sys/stat.h
83old.bin.grep: old.bin.grep.c /usr/include/sys/types.h /usr/include/sys/file.h
84old.bin.grep: /usr/include/sys/stat.h /usr/include/stdio.h /usr/include/ctype.h
85old.fgrep: old.fgrep.c /usr/include/stdio.h /usr/include/ctype.h
86old.fgrep: /usr/include/sys/param.h /usr/include/sys/types.h
87old.fgrep: /usr/include/signal.h /usr/include/machine/trap.h
88old.fgrep: /usr/include/machine/machparam.h /usr/include/sys/stat.h
89old.egrep: old.egrep.c /usr/include/stdio.h /usr/include/sys/types.h
90old.egrep: /usr/include/sys/stat.h /usr/include/ctype.h
91
92# IF YOU PUT ANYTHING HERE IT WILL GO AWAY