Commit | Line | Data |
---|---|---|
fef62a9f | 1 | # |
35371dec | 2 | # @(#)Makefile 4.7 (Berkeley) %G% |
fef62a9f BJ |
3 | # |
4 | # C Shell with process control; VM/UNIX VAX Makefile | |
5 | # Bill Joy UC Berkeley; Jim Kulp IIASA, Austria | |
6 | # | |
35371dec EW |
7 | # To profile, put -DPROF in DEFS and -pg in CFLAGS, and recompile. |
8 | ||
9 | DEFS= -DTELL -DVFORK -DFILEC | |
10 | CFLAGS= $(DEFS) -O | |
fef62a9f | 11 | XSTR= /usr/ucb/xstr |
35371dec | 12 | AS= as |
fef62a9f BJ |
13 | RM= -rm |
14 | CXREF= /usr/ucb/cxref | |
15 | VGRIND= csh /usr/ucb/vgrind | |
16 | CTAGS= /usr/ucb/ctags | |
6ca601c1 | 17 | LIBES= |
fef62a9f BJ |
18 | SCCS= /usr/local/sccs |
19 | ||
35371dec EW |
20 | OBJS= alloc.o doprnt.o printf.o sh.o sh.char.o sh.dir.o sh.dol.o sh.err.o \ |
21 | sh.exec.o sh.exp.o sh.file.o sh.func.o sh.glob.o sh.hist.o sh.init.o \ | |
22 | sh.lex.o sh.misc.o sh.parse.o sh.print.o sh.proc.o sh.sem.o sh.set.o \ | |
23 | sh.time.o | |
fef62a9f BJ |
24 | |
25 | # Special massaging of C files for sharing of strings | |
26 | .c.o: | |
27 | ${CC} -E ${CFLAGS} $*.c | ${XSTR} -c - | |
28 | ${CC} -c ${CFLAGS} x.c | |
f7f80f24 | 29 | mv -f x.o $*.o |
644ec8bb | 30 | rm -f x.c |
fef62a9f | 31 | |
35371dec EW |
32 | # strings.o must be last since it can change when previous files compile |
33 | csh: ${OBJS} strings.o | |
fef62a9f | 34 | rm -f csh |
35371dec | 35 | ${CC} ${OBJS} strings.o -o csh ${LIBES} |
fef62a9f BJ |
36 | |
37 | .DEFAULT: | |
38 | ${SCCS} get $< | |
39 | ||
40 | # need an old doprnt, whose output we can trap | |
41 | doprnt.o: doprnt.c | |
35371dec | 42 | ${CC} -E doprnt.c | ${AS} -o doprnt.o |
fef62a9f BJ |
43 | |
44 | # strings.o and sh.init.o are specially processed to be shared | |
45 | strings.o: strings | |
46 | ${XSTR} | |
47 | ${CC} -c -R xs.c | |
f7f80f24 | 48 | mv -f xs.o strings.o |
644ec8bb | 49 | rm -f xs.c |
fef62a9f BJ |
50 | |
51 | sh.init.o: | |
52 | ${CC} -E ${CFLAGS} sh.init.c | ${XSTR} -c - | |
53 | ${CC} ${CFLAGS} -c -R x.c | |
f7f80f24 | 54 | mv -f x.o sh.init.o |
644ec8bb | 55 | rm -f x.c |
fef62a9f BJ |
56 | |
57 | lint: | |
35371dec | 58 | lint -z ${DEFS} sh*.c alloc.c |
fef62a9f BJ |
59 | |
60 | print: | |
61 | @pr READ_ME | |
62 | @pr makefile makefile.* | |
63 | @(size -l a.out; size *.o) | pr -h SIZES | |
64 | @${CXREF} sh*.c | pr -h XREF | |
65 | @ls -l | pr | |
66 | @pr sh*.h [a-rt-z]*.h sh*.c alloc.c | |
67 | ||
68 | vprint: | |
69 | @pr -l84 READ_ME TODO | |
70 | @pr -l84 makefile makefile.* | |
71 | @(size -l a.out; size *.o) | pr -l84 -h SIZES | |
72 | @${CXREF} sh*.c | pr -l84 -h XREF | |
73 | @ls -l | pr -l84 | |
74 | @${CXREF} sh*.c | pr -l84 -h XREF | |
75 | @pr -l84 sh*.h [a-rt-z]*.h sh*.c alloc.c | |
76 | ||
77 | vgrind: | |
78 | @cp /dev/null index | |
79 | @for i in *.h; do vgrind -t -h "C Shell" $$i >/crp/bill/csh/$$i.t; done | |
80 | @for i in *.c; do vgrind -t -h "C Shell" $$i >/crp/bill/csh/$$i.t; done | |
81 | @vgrind -t -x -h Index index >/crp/bill/csh/index.t | |
82 | ||
35371dec | 83 | install: csh |
fef62a9f BJ |
84 | install -s csh ${DESTDIR}/bin/csh |
85 | ||
86 | clean: | |
2f2a0649 | 87 | ${RM} -f a.out strings x.c xs.c csh errs |
35371dec EW |
88 | ${RM} -f *.o |
89 | ||
90 | tags: | |
91 | ${CTAGS} *.h sh*.c | |
fef62a9f | 92 | |
35371dec EW |
93 | ### |
94 | alloc.o: /usr/include/sys/types.h | |
95 | sh.o: sh.h /usr/include/sys/time.h /usr/include/sys/resource.h \ | |
96 | /usr/include/sys/param.h /usr/include/machine/machparam.h \ | |
97 | /usr/include/signal.h /usr/include/signal.h /usr/include/sys/types.h \ | |
98 | /usr/include/sys/stat.h /usr/include/sys/signal.h \ | |
99 | /usr/include/errno.h /usr/include/setjmp.h sh.local.h \ | |
100 | /usr/include/sys/ioctl.h /usr/include/sys/ttychars.h \ | |
101 | /usr/include/sys/ttydev.h /usr/include/sys/jioctl.h \ | |
102 | /usr/include/fcntl.h /usr/include/pwd.h | |
103 | sh.char.o: sh.char.h | |
104 | sh.dir.o: sh.h /usr/include/sys/time.h /usr/include/sys/resource.h \ | |
105 | /usr/include/sys/param.h /usr/include/machine/machparam.h \ | |
106 | /usr/include/signal.h /usr/include/signal.h /usr/include/sys/types.h \ | |
107 | /usr/include/sys/stat.h /usr/include/sys/signal.h \ | |
108 | /usr/include/errno.h /usr/include/setjmp.h sh.local.h sh.dir.h | |
109 | sh.dol.o: sh.h /usr/include/sys/time.h /usr/include/sys/resource.h \ | |
110 | /usr/include/sys/param.h /usr/include/machine/machparam.h \ | |
111 | /usr/include/signal.h /usr/include/signal.h /usr/include/sys/types.h \ | |
112 | /usr/include/sys/stat.h /usr/include/sys/signal.h \ | |
113 | /usr/include/errno.h /usr/include/setjmp.h sh.local.h sh.char.h | |
114 | sh.err.o: sh.h /usr/include/sys/time.h /usr/include/sys/resource.h \ | |
115 | /usr/include/sys/param.h /usr/include/machine/machparam.h \ | |
116 | /usr/include/signal.h /usr/include/signal.h /usr/include/sys/types.h \ | |
117 | /usr/include/sys/stat.h /usr/include/sys/signal.h \ | |
118 | /usr/include/errno.h /usr/include/setjmp.h sh.local.h \ | |
119 | /usr/include/sys/ioctl.h /usr/include/sys/ttychars.h \ | |
120 | /usr/include/sys/ttydev.h /usr/include/sys/jioctl.h | |
121 | sh.exec.o: sh.h /usr/include/sys/time.h /usr/include/sys/resource.h \ | |
122 | /usr/include/sys/param.h /usr/include/machine/machparam.h \ | |
123 | /usr/include/signal.h /usr/include/signal.h /usr/include/sys/types.h \ | |
124 | /usr/include/sys/stat.h /usr/include/sys/signal.h \ | |
125 | /usr/include/errno.h /usr/include/setjmp.h sh.local.h \ | |
126 | /usr/include/sys/dir.h | |
127 | sh.exp.o: sh.h /usr/include/sys/time.h /usr/include/sys/resource.h \ | |
128 | /usr/include/sys/param.h /usr/include/machine/machparam.h \ | |
129 | /usr/include/signal.h /usr/include/signal.h /usr/include/sys/types.h \ | |
130 | /usr/include/sys/stat.h /usr/include/sys/signal.h \ | |
131 | /usr/include/errno.h /usr/include/setjmp.h sh.local.h | |
132 | sh.file.o: sh.h /usr/include/sys/time.h /usr/include/sys/resource.h \ | |
133 | /usr/include/sys/param.h /usr/include/machine/machparam.h \ | |
134 | /usr/include/signal.h /usr/include/signal.h /usr/include/sys/types.h \ | |
135 | /usr/include/sys/stat.h /usr/include/sys/signal.h \ | |
136 | /usr/include/errno.h /usr/include/setjmp.h sh.local.h \ | |
137 | /usr/include/sgtty.h /usr/include/sys/ioctl.h \ | |
138 | /usr/include/sys/ttychars.h /usr/include/sys/ttydev.h \ | |
139 | /usr/include/sys/jioctl.h /usr/include/sys/dir.h /usr/include/pwd.h | |
140 | sh.func.o: sh.h /usr/include/sys/time.h /usr/include/sys/resource.h \ | |
141 | /usr/include/sys/param.h /usr/include/machine/machparam.h \ | |
142 | /usr/include/signal.h /usr/include/signal.h /usr/include/sys/types.h \ | |
143 | /usr/include/sys/stat.h /usr/include/sys/signal.h \ | |
144 | /usr/include/errno.h /usr/include/setjmp.h sh.local.h \ | |
145 | /usr/include/sys/ioctl.h /usr/include/sys/ttychars.h \ | |
146 | /usr/include/sys/ttydev.h /usr/include/sys/jioctl.h | |
147 | sh.glob.o: sh.h /usr/include/sys/time.h /usr/include/sys/resource.h \ | |
148 | /usr/include/sys/param.h /usr/include/machine/machparam.h \ | |
149 | /usr/include/signal.h /usr/include/signal.h /usr/include/sys/types.h \ | |
150 | /usr/include/sys/stat.h /usr/include/sys/signal.h \ | |
151 | /usr/include/errno.h /usr/include/setjmp.h sh.local.h sh.char.h \ | |
152 | /usr/include/sys/dir.h | |
153 | sh.hist.o: sh.h /usr/include/sys/time.h /usr/include/sys/resource.h \ | |
154 | /usr/include/sys/param.h /usr/include/machine/machparam.h \ | |
155 | /usr/include/signal.h /usr/include/signal.h /usr/include/sys/types.h \ | |
156 | /usr/include/sys/stat.h /usr/include/sys/signal.h \ | |
157 | /usr/include/errno.h /usr/include/setjmp.h sh.local.h | |
158 | sh.init.o: sh.local.h | |
159 | sh.lex.o: sh.h /usr/include/sys/time.h /usr/include/sys/resource.h \ | |
160 | /usr/include/sys/param.h /usr/include/machine/machparam.h \ | |
161 | /usr/include/signal.h /usr/include/signal.h /usr/include/sys/types.h \ | |
162 | /usr/include/sys/stat.h /usr/include/sys/signal.h \ | |
163 | /usr/include/errno.h /usr/include/setjmp.h sh.local.h sh.char.h \ | |
164 | /usr/include/sgtty.h /usr/include/sys/ioctl.h \ | |
165 | /usr/include/sys/ttychars.h /usr/include/sys/ttydev.h \ | |
166 | /usr/include/sys/jioctl.h | |
167 | sh.misc.o: sh.h /usr/include/sys/time.h /usr/include/sys/resource.h \ | |
168 | /usr/include/sys/param.h /usr/include/machine/machparam.h \ | |
169 | /usr/include/signal.h /usr/include/signal.h /usr/include/sys/types.h \ | |
170 | /usr/include/sys/stat.h /usr/include/sys/signal.h \ | |
171 | /usr/include/errno.h /usr/include/setjmp.h sh.local.h | |
172 | sh.parse.o: sh.h /usr/include/sys/time.h /usr/include/sys/resource.h \ | |
173 | /usr/include/sys/param.h /usr/include/machine/machparam.h \ | |
174 | /usr/include/signal.h /usr/include/signal.h /usr/include/sys/types.h \ | |
175 | /usr/include/sys/stat.h /usr/include/sys/signal.h \ | |
176 | /usr/include/errno.h /usr/include/setjmp.h sh.local.h | |
177 | sh.print.o: sh.h /usr/include/sys/time.h /usr/include/sys/resource.h \ | |
178 | /usr/include/sys/param.h /usr/include/machine/machparam.h \ | |
179 | /usr/include/signal.h /usr/include/signal.h /usr/include/sys/types.h \ | |
180 | /usr/include/sys/stat.h /usr/include/sys/signal.h \ | |
181 | /usr/include/errno.h /usr/include/setjmp.h sh.local.h \ | |
182 | /usr/include/sys/ioctl.h /usr/include/sys/ttychars.h \ | |
183 | /usr/include/sys/ttydev.h /usr/include/sys/jioctl.h | |
184 | sh.proc.o: sh.h /usr/include/sys/time.h /usr/include/sys/resource.h \ | |
185 | /usr/include/sys/param.h /usr/include/machine/machparam.h \ | |
186 | /usr/include/signal.h /usr/include/signal.h /usr/include/sys/types.h \ | |
187 | /usr/include/sys/stat.h /usr/include/sys/signal.h \ | |
188 | /usr/include/errno.h /usr/include/setjmp.h sh.local.h sh.dir.h \ | |
189 | sh.proc.h /usr/include/sys/wait.h /usr/include/sys/ioctl.h \ | |
190 | /usr/include/sys/ttychars.h /usr/include/sys/ttydev.h \ | |
191 | /usr/include/sys/jioctl.h | |
192 | sh.sem.o: sh.h /usr/include/sys/time.h /usr/include/sys/resource.h \ | |
193 | /usr/include/sys/param.h /usr/include/machine/machparam.h \ | |
194 | /usr/include/signal.h /usr/include/signal.h /usr/include/sys/types.h \ | |
195 | /usr/include/sys/stat.h /usr/include/sys/signal.h \ | |
196 | /usr/include/errno.h /usr/include/setjmp.h sh.local.h sh.proc.h \ | |
197 | /usr/include/sys/ioctl.h /usr/include/sys/ttychars.h \ | |
198 | /usr/include/sys/ttydev.h /usr/include/sys/jioctl.h \ | |
199 | /usr/include/fcntl.h | |
200 | sh.set.o: sh.h /usr/include/sys/time.h /usr/include/sys/resource.h \ | |
201 | /usr/include/sys/param.h /usr/include/machine/machparam.h \ | |
202 | /usr/include/signal.h /usr/include/signal.h /usr/include/sys/types.h \ | |
203 | /usr/include/sys/stat.h /usr/include/sys/signal.h \ | |
204 | /usr/include/errno.h /usr/include/setjmp.h sh.local.h | |
205 | sh.time.o: sh.h /usr/include/sys/time.h /usr/include/sys/resource.h \ | |
206 | /usr/include/sys/param.h /usr/include/machine/machparam.h \ | |
207 | /usr/include/signal.h /usr/include/signal.h /usr/include/sys/types.h \ | |
208 | /usr/include/sys/stat.h /usr/include/sys/signal.h \ | |
209 | /usr/include/errno.h /usr/include/setjmp.h sh.local.h |