Commit | Line | Data |
---|---|---|
fef62a9f | 1 | # |
b79f4fa9 | 2 | # Copyright (c) 1980 Regents of the University of California. |
094e80ed | 3 | # All rights reserved. The Berkeley Software License Agreement |
b79f4fa9 DF |
4 | # specifies the terms and conditions for redistribution. |
5 | # | |
fad613b5 | 6 | # @(#)Makefile 5.10 (Berkeley) %G% |
fef62a9f BJ |
7 | # |
8 | # C Shell with process control; VM/UNIX VAX Makefile | |
9 | # Bill Joy UC Berkeley; Jim Kulp IIASA, Austria | |
10 | # | |
35371dec EW |
11 | # To profile, put -DPROF in DEFS and -pg in CFLAGS, and recompile. |
12 | ||
13 | DEFS= -DTELL -DVFORK -DFILEC | |
66456d87 | 14 | CFLAGS= ${DEFS} -O |
fef62a9f | 15 | XSTR= /usr/ucb/xstr |
9bdca61e | 16 | VGRIND= /usr/ucb/vgrind |
9db2f2d5 | 17 | |
fad613b5 KB |
18 | SRCS= alloc.c doprnt.c sh.c sh.char.c sh.dir.c sh.dol.c sh.err.c \ |
19 | sh.exec.c sh.exp.c sh.file.c sh.func.c sh.glob.c sh.hist.c \ | |
20 | sh.init.c sh.lex.c sh.misc.c sh.parse.c sh.print.c sh.proc.c \ | |
21 | sh.sem.c sh.set.c sh.time.c | |
22 | OBJS= alloc.o doprnt.o sh.o sh.char.o sh.dir.o sh.dol.o sh.err.o \ | |
23 | sh.exec.o sh.exp.o sh.file.o sh.func.o sh.glob.o sh.hist.o \ | |
24 | sh.init.o sh.lex.o sh.misc.o sh.parse.o sh.print.o sh.proc.o \ | |
25 | sh.sem.o sh.set.o sh.time.o | |
fef62a9f BJ |
26 | |
27 | # Special massaging of C files for sharing of strings | |
28 | .c.o: | |
29 | ${CC} -E ${CFLAGS} $*.c | ${XSTR} -c - | |
30 | ${CC} -c ${CFLAGS} x.c | |
f7f80f24 | 31 | mv -f x.o $*.o |
644ec8bb | 32 | rm -f x.c |
fef62a9f | 33 | |
35371dec EW |
34 | # strings.o must be last since it can change when previous files compile |
35 | csh: ${OBJS} strings.o | |
9db2f2d5 | 36 | ${CC} ${CFLAGS} ${OBJS} strings.o -o $@ |
fef62a9f | 37 | |
9bdca61e | 38 | # strings.o, sh.init.o, and sh.char.o are specially processed to be shared |
fef62a9f BJ |
39 | strings.o: strings |
40 | ${XSTR} | |
41 | ${CC} -c -R xs.c | |
f7f80f24 | 42 | mv -f xs.o strings.o |
644ec8bb | 43 | rm -f xs.c |
fef62a9f | 44 | |
9bdca61e JL |
45 | sh.char.o sh.init.o: |
46 | ${CC} -E ${CFLAGS} $*.c | ${XSTR} -c - | |
fef62a9f | 47 | ${CC} ${CFLAGS} -c -R x.c |
9bdca61e | 48 | mv -f x.o $*.o |
644ec8bb | 49 | rm -f x.c |
66456d87 | 50 | |
9db2f2d5 KB |
51 | .DEFAULT: |
52 | sccs get $< | |
53 | ||
54 | clean: | |
e5ca4102 | 55 | rm -f a.out strings strings.o x.c xs.c csh errs |
9db2f2d5 KB |
56 | rm -f ${OBJS} |
57 | rm -rf vgrind | |
58 | ||
59 | depend: | |
60 | mkdep ${CFLAGS} ${SRCS} | |
61 | ||
fef62a9f | 62 | lint: |
9db2f2d5 KB |
63 | lint ${CFLAGS} ${SRCS} |
64 | ||
65 | install: csh | |
66 | install -s -o bin -g bin -m 755 csh ${DESTDIR}/bin/csh | |
67 | ||
68 | tags: | |
69 | ctags ${SRCS} | |
fef62a9f BJ |
70 | |
71 | print: | |
72 | @pr READ_ME | |
9bdca61e | 73 | @pr Makefile Makefile.* |
fef62a9f BJ |
74 | @(size -l a.out; size *.o) | pr -h SIZES |
75 | @${CXREF} sh*.c | pr -h XREF | |
76 | @ls -l | pr | |
77 | @pr sh*.h [a-rt-z]*.h sh*.c alloc.c | |
78 | ||
79 | vprint: | |
80 | @pr -l84 READ_ME TODO | |
9bdca61e | 81 | @pr -l84 Makefile Makefile.* |
fef62a9f BJ |
82 | @(size -l a.out; size *.o) | pr -l84 -h SIZES |
83 | @${CXREF} sh*.c | pr -l84 -h XREF | |
84 | @ls -l | pr -l84 | |
85 | @${CXREF} sh*.c | pr -l84 -h XREF | |
86 | @pr -l84 sh*.h [a-rt-z]*.h sh*.c alloc.c | |
87 | ||
88 | vgrind: | |
89 | @cp /dev/null index | |
9bdca61e JL |
90 | @-mkdir grind |
91 | for i in *.h; do ${VGRIND} -t -h "C Shell" $$i >grind/$$i.t; done | |
92 | for i in *.c; do ${VGRIND} -t -h "C Shell" $$i >grind/$$i.t; done | |
93 | ${VGRIND} -t -x -h Index index >grind/index.t | |
fef62a9f | 94 | |
66456d87 KB |
95 | # DO NOT DELETE THIS LINE -- mkdep uses it. |
96 | # DO NOT PUT ANYTHING AFTER THIS LINE, IT WILL GO AWAY. | |
97 | ||
98 | alloc.o: alloc.c /usr/include/sys/types.h | |
9db2f2d5 KB |
99 | sh.o: sh.c |
100 | sh.o:sh.h | |
101 | sh.o: /usr/include/sys/time.h /usr/include/time.h /usr/include/sys/resource.h | |
102 | sh.o: /usr/include/sys/param.h /usr/include/sys/types.h /usr/include/signal.h | |
66456d87 KB |
103 | sh.o: /usr/include/machine/machparam.h /usr/include/sys/stat.h |
104 | sh.o: /usr/include/sys/signal.h /usr/include/errno.h /usr/include/setjmp.h | |
9db2f2d5 KB |
105 | sh.o:sh.local.h |
106 | sh.o:sh.char.h | |
107 | sh.o: /usr/include/sys/ioctl.h /usr/include/sys/ttychars.h | |
66456d87 | 108 | sh.o: /usr/include/sys/ttydev.h /usr/include/pwd.h |
9db2f2d5 KB |
109 | sh.char.o: sh.char.c |
110 | sh.char.o:sh.char.h | |
111 | sh.dir.o: sh.dir.c | |
112 | sh.dir.o:sh.h | |
113 | sh.dir.o: /usr/include/sys/time.h /usr/include/time.h | |
66456d87 KB |
114 | sh.dir.o: /usr/include/sys/resource.h /usr/include/sys/param.h |
115 | sh.dir.o: /usr/include/sys/types.h /usr/include/signal.h | |
116 | sh.dir.o: /usr/include/machine/machparam.h /usr/include/sys/stat.h | |
117 | sh.dir.o: /usr/include/sys/signal.h /usr/include/errno.h /usr/include/setjmp.h | |
9db2f2d5 KB |
118 | sh.dir.o:sh.local.h |
119 | sh.dir.o:sh.char.h | |
120 | sh.dir.o:sh.dir.h | |
121 | sh.dol.o: sh.dol.c | |
122 | sh.dol.o:sh.h | |
123 | sh.dol.o: /usr/include/sys/time.h /usr/include/time.h | |
66456d87 KB |
124 | sh.dol.o: /usr/include/sys/resource.h /usr/include/sys/param.h |
125 | sh.dol.o: /usr/include/sys/types.h /usr/include/signal.h | |
126 | sh.dol.o: /usr/include/machine/machparam.h /usr/include/sys/stat.h | |
127 | sh.dol.o: /usr/include/sys/signal.h /usr/include/errno.h /usr/include/setjmp.h | |
9db2f2d5 KB |
128 | sh.dol.o:sh.local.h |
129 | sh.dol.o:sh.char.h | |
130 | sh.err.o: sh.err.c | |
131 | sh.err.o:sh.h | |
132 | sh.err.o: /usr/include/sys/time.h /usr/include/time.h | |
66456d87 KB |
133 | sh.err.o: /usr/include/sys/resource.h /usr/include/sys/param.h |
134 | sh.err.o: /usr/include/sys/types.h /usr/include/signal.h | |
135 | sh.err.o: /usr/include/machine/machparam.h /usr/include/sys/stat.h | |
136 | sh.err.o: /usr/include/sys/signal.h /usr/include/errno.h /usr/include/setjmp.h | |
9db2f2d5 KB |
137 | sh.err.o:sh.local.h |
138 | sh.err.o:sh.char.h | |
139 | sh.err.o: /usr/include/sys/ioctl.h /usr/include/sys/ttychars.h | |
140 | sh.err.o: /usr/include/sys/ttydev.h | |
141 | sh.exec.o: sh.exec.c | |
142 | sh.exec.o:sh.h | |
143 | sh.exec.o: /usr/include/sys/time.h /usr/include/time.h | |
66456d87 KB |
144 | sh.exec.o: /usr/include/sys/resource.h /usr/include/sys/param.h |
145 | sh.exec.o: /usr/include/sys/types.h /usr/include/signal.h | |
146 | sh.exec.o: /usr/include/machine/machparam.h /usr/include/sys/stat.h | |
147 | sh.exec.o: /usr/include/sys/signal.h /usr/include/errno.h /usr/include/setjmp.h | |
9db2f2d5 KB |
148 | sh.exec.o:sh.local.h |
149 | sh.exec.o:sh.char.h | |
150 | sh.exec.o: /usr/include/sys/dir.h | |
151 | sh.exp.o: sh.exp.c | |
152 | sh.exp.o:sh.h | |
153 | sh.exp.o: /usr/include/sys/time.h /usr/include/time.h | |
66456d87 KB |
154 | sh.exp.o: /usr/include/sys/resource.h /usr/include/sys/param.h |
155 | sh.exp.o: /usr/include/sys/types.h /usr/include/signal.h | |
156 | sh.exp.o: /usr/include/machine/machparam.h /usr/include/sys/stat.h | |
157 | sh.exp.o: /usr/include/sys/signal.h /usr/include/errno.h /usr/include/setjmp.h | |
9db2f2d5 KB |
158 | sh.exp.o:sh.local.h |
159 | sh.exp.o:sh.char.h | |
160 | sh.file.o: sh.file.c | |
161 | sh.file.o:sh.h | |
162 | sh.file.o: /usr/include/sys/time.h /usr/include/time.h | |
66456d87 KB |
163 | sh.file.o: /usr/include/sys/resource.h /usr/include/sys/param.h |
164 | sh.file.o: /usr/include/sys/types.h /usr/include/signal.h | |
165 | sh.file.o: /usr/include/machine/machparam.h /usr/include/sys/stat.h | |
166 | sh.file.o: /usr/include/sys/signal.h /usr/include/errno.h /usr/include/setjmp.h | |
9db2f2d5 KB |
167 | sh.file.o:sh.local.h |
168 | sh.file.o:sh.char.h | |
169 | sh.file.o: /usr/include/sgtty.h /usr/include/sys/ioctl.h | |
66456d87 KB |
170 | sh.file.o: /usr/include/sys/ttychars.h /usr/include/sys/ttydev.h |
171 | sh.file.o: /usr/include/sys/dir.h /usr/include/pwd.h | |
9db2f2d5 KB |
172 | sh.func.o: sh.func.c |
173 | sh.func.o:sh.h | |
174 | sh.func.o: /usr/include/sys/time.h /usr/include/time.h | |
66456d87 KB |
175 | sh.func.o: /usr/include/sys/resource.h /usr/include/sys/param.h |
176 | sh.func.o: /usr/include/sys/types.h /usr/include/signal.h | |
177 | sh.func.o: /usr/include/machine/machparam.h /usr/include/sys/stat.h | |
178 | sh.func.o: /usr/include/sys/signal.h /usr/include/errno.h /usr/include/setjmp.h | |
9db2f2d5 KB |
179 | sh.func.o:sh.local.h |
180 | sh.func.o:sh.char.h | |
181 | sh.func.o: /usr/include/sys/ioctl.h /usr/include/sys/ttychars.h | |
182 | sh.func.o: /usr/include/sys/ttydev.h | |
183 | sh.glob.o: sh.glob.c | |
184 | sh.glob.o:sh.h | |
185 | sh.glob.o: /usr/include/sys/time.h /usr/include/time.h | |
66456d87 KB |
186 | sh.glob.o: /usr/include/sys/resource.h /usr/include/sys/param.h |
187 | sh.glob.o: /usr/include/sys/types.h /usr/include/signal.h | |
188 | sh.glob.o: /usr/include/machine/machparam.h /usr/include/sys/stat.h | |
189 | sh.glob.o: /usr/include/sys/signal.h /usr/include/errno.h /usr/include/setjmp.h | |
9db2f2d5 KB |
190 | sh.glob.o:sh.local.h |
191 | sh.glob.o:sh.char.h | |
192 | sh.glob.o: /usr/include/sys/dir.h | |
193 | sh.hist.o: sh.hist.c | |
194 | sh.hist.o:sh.h | |
195 | sh.hist.o: /usr/include/sys/time.h /usr/include/time.h | |
66456d87 KB |
196 | sh.hist.o: /usr/include/sys/resource.h /usr/include/sys/param.h |
197 | sh.hist.o: /usr/include/sys/types.h /usr/include/signal.h | |
198 | sh.hist.o: /usr/include/machine/machparam.h /usr/include/sys/stat.h | |
199 | sh.hist.o: /usr/include/sys/signal.h /usr/include/errno.h /usr/include/setjmp.h | |
9db2f2d5 KB |
200 | sh.hist.o:sh.local.h |
201 | sh.hist.o:sh.char.h | |
202 | sh.init.o: sh.init.c | |
203 | sh.init.o:sh.local.h | |
204 | sh.lex.o: sh.lex.c | |
205 | sh.lex.o:sh.h | |
206 | sh.lex.o: /usr/include/sys/time.h /usr/include/time.h | |
66456d87 KB |
207 | sh.lex.o: /usr/include/sys/resource.h /usr/include/sys/param.h |
208 | sh.lex.o: /usr/include/sys/types.h /usr/include/signal.h | |
209 | sh.lex.o: /usr/include/machine/machparam.h /usr/include/sys/stat.h | |
210 | sh.lex.o: /usr/include/sys/signal.h /usr/include/errno.h /usr/include/setjmp.h | |
9db2f2d5 KB |
211 | sh.lex.o:sh.local.h |
212 | sh.lex.o:sh.char.h | |
213 | sh.lex.o: /usr/include/sgtty.h /usr/include/sys/ioctl.h | |
66456d87 | 214 | sh.lex.o: /usr/include/sys/ttychars.h /usr/include/sys/ttydev.h |
9db2f2d5 KB |
215 | sh.misc.o: sh.misc.c |
216 | sh.misc.o:sh.h | |
217 | sh.misc.o: /usr/include/sys/time.h /usr/include/time.h | |
66456d87 KB |
218 | sh.misc.o: /usr/include/sys/resource.h /usr/include/sys/param.h |
219 | sh.misc.o: /usr/include/sys/types.h /usr/include/signal.h | |
220 | sh.misc.o: /usr/include/machine/machparam.h /usr/include/sys/stat.h | |
221 | sh.misc.o: /usr/include/sys/signal.h /usr/include/errno.h /usr/include/setjmp.h | |
9db2f2d5 KB |
222 | sh.misc.o:sh.local.h |
223 | sh.misc.o:sh.char.h | |
224 | sh.parse.o: sh.parse.c | |
225 | sh.parse.o:sh.h | |
226 | sh.parse.o: /usr/include/sys/time.h /usr/include/time.h | |
66456d87 KB |
227 | sh.parse.o: /usr/include/sys/resource.h /usr/include/sys/param.h |
228 | sh.parse.o: /usr/include/sys/types.h /usr/include/signal.h | |
229 | sh.parse.o: /usr/include/machine/machparam.h /usr/include/sys/stat.h | |
230 | sh.parse.o: /usr/include/sys/signal.h /usr/include/errno.h | |
9db2f2d5 KB |
231 | sh.parse.o: /usr/include/setjmp.h |
232 | sh.parse.o:sh.local.h | |
233 | sh.parse.o:sh.char.h | |
234 | sh.print.o: sh.print.c | |
235 | sh.print.o:sh.h | |
236 | sh.print.o: /usr/include/sys/time.h /usr/include/time.h | |
66456d87 KB |
237 | sh.print.o: /usr/include/sys/resource.h /usr/include/sys/param.h |
238 | sh.print.o: /usr/include/sys/types.h /usr/include/signal.h | |
239 | sh.print.o: /usr/include/machine/machparam.h /usr/include/sys/stat.h | |
240 | sh.print.o: /usr/include/sys/signal.h /usr/include/errno.h | |
9db2f2d5 KB |
241 | sh.print.o: /usr/include/setjmp.h |
242 | sh.print.o:sh.local.h | |
243 | sh.print.o:sh.char.h | |
244 | sh.print.o: /usr/include/sys/ioctl.h /usr/include/sys/ttychars.h | |
245 | sh.print.o: /usr/include/sys/ttydev.h | |
246 | sh.proc.o: sh.proc.c | |
247 | sh.proc.o:sh.h | |
248 | sh.proc.o: /usr/include/sys/time.h /usr/include/time.h | |
66456d87 KB |
249 | sh.proc.o: /usr/include/sys/resource.h /usr/include/sys/param.h |
250 | sh.proc.o: /usr/include/sys/types.h /usr/include/signal.h | |
251 | sh.proc.o: /usr/include/machine/machparam.h /usr/include/sys/stat.h | |
252 | sh.proc.o: /usr/include/sys/signal.h /usr/include/errno.h /usr/include/setjmp.h | |
9db2f2d5 KB |
253 | sh.proc.o:sh.local.h |
254 | sh.proc.o:sh.char.h | |
255 | sh.proc.o:sh.dir.h | |
256 | sh.proc.o:sh.proc.h | |
257 | sh.proc.o: /usr/include/sys/wait.h /usr/include/sys/ioctl.h | |
258 | sh.proc.o: /usr/include/sys/ttychars.h /usr/include/sys/ttydev.h | |
259 | sh.sem.o: sh.sem.c | |
260 | sh.sem.o:sh.h | |
261 | sh.sem.o: /usr/include/sys/time.h /usr/include/time.h | |
66456d87 KB |
262 | sh.sem.o: /usr/include/sys/resource.h /usr/include/sys/param.h |
263 | sh.sem.o: /usr/include/sys/types.h /usr/include/signal.h | |
264 | sh.sem.o: /usr/include/machine/machparam.h /usr/include/sys/stat.h | |
265 | sh.sem.o: /usr/include/sys/signal.h /usr/include/errno.h /usr/include/setjmp.h | |
9db2f2d5 KB |
266 | sh.sem.o:sh.local.h |
267 | sh.sem.o:sh.char.h | |
268 | sh.sem.o:sh.proc.h | |
269 | sh.sem.o: /usr/include/sys/ioctl.h /usr/include/sys/ttychars.h | |
270 | sh.sem.o: /usr/include/sys/ttydev.h | |
271 | sh.set.o: sh.set.c | |
272 | sh.set.o:sh.h | |
273 | sh.set.o: /usr/include/sys/time.h /usr/include/time.h | |
66456d87 KB |
274 | sh.set.o: /usr/include/sys/resource.h /usr/include/sys/param.h |
275 | sh.set.o: /usr/include/sys/types.h /usr/include/signal.h | |
276 | sh.set.o: /usr/include/machine/machparam.h /usr/include/sys/stat.h | |
277 | sh.set.o: /usr/include/sys/signal.h /usr/include/errno.h /usr/include/setjmp.h | |
9db2f2d5 KB |
278 | sh.set.o:sh.local.h |
279 | sh.set.o:sh.char.h | |
280 | sh.time.o: sh.time.c | |
281 | sh.time.o:sh.h | |
282 | sh.time.o: /usr/include/sys/time.h /usr/include/time.h | |
66456d87 KB |
283 | sh.time.o: /usr/include/sys/resource.h /usr/include/sys/param.h |
284 | sh.time.o: /usr/include/sys/types.h /usr/include/signal.h | |
285 | sh.time.o: /usr/include/machine/machparam.h /usr/include/sys/stat.h | |
286 | sh.time.o: /usr/include/sys/signal.h /usr/include/errno.h /usr/include/setjmp.h | |
9db2f2d5 KB |
287 | sh.time.o:sh.local.h |
288 | sh.time.o:sh.char.h | |
66456d87 KB |
289 | |
290 | # IF YOU PUT ANYTHING HERE IT WILL GO AWAY |