Commit | Line | Data |
---|---|---|
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 | 23 | CFLAGS= -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\" | |
26 | LIBC= /lib/libc.a | |
27 | ALL= egrep old.ucb.grep old.bin.grep old.fgrep old.egrep | |
28 | SRCS= egrep.c old.ucb.grep.c old.bin.grep.c old.fgrep.c old.egrep.c | |
29 | OBJS= | |
30 | ||
31 | all: ${ALL} | |
32 | ||
33 | egrep: egrep.c ${LIBC} | |
34 | ${CC} -o $@ ${CFLAGS} egrep.c | |
35 | ||
36 | oegrep: oegrep.c ${LIBC} | |
37 | ${CC} -o $@ ${CFLAGS} oegrep.c | |
38 | ||
39 | old.ucb.grep: ${LIBC} | |
40 | ${CC} -o $@ ${CFLAGS} old.ucb.grep.c | |
41 | ||
42 | old.bin.grep: ${LIBC} | |
43 | ${CC} -o $@ ${CFLAGS} old.bin.grep.c | |
44 | ||
45 | old.fgrep: ${LIBC} | |
46 | ${CC} -o $@ ${CFLAGS} old.fgrep.c | |
47 | ||
48 | old.egrep: ${LIBC} | |
49 | ${CC} -o $@ ${CFLAGS} old.egrep.c | |
50 | ||
51 | clean: FRC | |
52 | rm -f ${OBJS} core ${ALL} old.egrep.c | |
53 | ||
54 | depend: FRC ${SRCS} | |
55 | mkdep -p ${CFLAGS} ${SRCS} | |
56 | ||
57 | install: 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 | ||
67 | lint: FRC ${SRCS} | |
68 | lint ${CFLAGS} ${SRCS} | |
69 | ||
70 | tags: FRC ${SRCS} | |
71 | ctags ${SRCS} | |
72 | ||
73 | FRC: | |
74 | ||
75 | # DO NOT DELETE THIS LINE -- mkdep uses it. | |
76 | # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. | |
77 | ||
78 | egrep: egrep.c /usr/include/stdio.h /usr/include/ctype.h | |
79 | egrep: /usr/include/sys/types.h /usr/include/sys/stat.h /usr/include/sys/file.h | |
80 | egrep: /usr/include/regexp.h | |
81 | old.ucb.grep: old.ucb.grep.c /usr/include/stdio.h /usr/include/sys/types.h | |
82 | old.ucb.grep: /usr/include/sys/stat.h | |
83 | old.bin.grep: old.bin.grep.c /usr/include/sys/types.h /usr/include/sys/file.h | |
84 | old.bin.grep: /usr/include/sys/stat.h /usr/include/stdio.h /usr/include/ctype.h | |
85 | old.fgrep: old.fgrep.c /usr/include/stdio.h /usr/include/ctype.h | |
86 | old.fgrep: /usr/include/sys/param.h /usr/include/sys/types.h | |
87 | old.fgrep: /usr/include/signal.h /usr/include/machine/trap.h | |
88 | old.fgrep: /usr/include/machine/machparam.h /usr/include/sys/stat.h | |
89 | old.egrep: old.egrep.c /usr/include/stdio.h /usr/include/sys/types.h | |
90 | old.egrep: /usr/include/sys/stat.h /usr/include/ctype.h | |
91 | ||
92 | # IF YOU PUT ANYTHING HERE IT WILL GO AWAY |