head     1.3;
access   ;
symbols  ;
locks    ; strict;
comment  @# @;


1.3
date     86.03.10.08.44.02;  author root;  state Exp;
branches ;
next     1.2;

1.2
date     86.03.06.09.25.31;  author root;  state Exp;
branches ;
next     1.1;

1.1
date     86.02.28.15.34.26;  author root;  state Exp;
branches ;
next     ;


desc
@@


1.3
log
@cleaned up some dependencies
@
text
@#
# $Header: Makefile,v 1.2 86/03/06 09:25:31 root Exp $
#
# $Log:	Makefile,v $
# Revision 1.2  86/03/06  09:25:31  root
# added dependence lines for eveybody (I think)
# 
# Revision 1.1  86/02/28  15:34:26  root
# Initial revision
# 
#
#
#	Makefile	4.3	6/11/83
#
# C Shell with process control; VM/UNIX VAX Makefile
# Bill Joy UC Berkeley; Jim Kulp IIASA, Austria
#
CFLAGS=	-O -DTELL -DVMUNIX -DVFORK
XSTR=	/usr/ucb/xstr
RM=	-rm
CXREF=	/usr/ucb/cxref
VGRIND=	csh /usr/ucb/vgrind
CTAGS=	/usr/ucb/ctags
LIBES=
SCCS=	/usr/local/sccs

# strings.o must be last in OBJS since it can change when previous files compile
OBJS=	alloc.o doprnt.o printf.o sh.o sh.dir.o sh.dol.o sh.err.o sh.exec.o \
	sh.exp.o sh.func.o sh.glob.o sh.hist.o sh.init.o sh.lex.o sh.misc.o \
	sh.parse.o sh.print.o sh.proc.o sh.sem.o sh.set.o sh.sig.o sh.time.o \
	strings.o

# Special massaging of C files for sharing of strings
.c.o:
	${CC} -E ${CFLAGS} $*.c | ${XSTR} -c -
	${CC} -c ${CFLAGS} x.c 
	mv x.o $*.o

csh: ${OBJS}
	rm -f csh
	cc ${OBJS} -o csh ${LIBES}

csh.prof: ${OBJS} sh.prof.o sh.local.h mcrt0.o
	rm -f csh.prof
	ld -X mcrt0.o ${OBJS} -o csh.prof ${LIBES} -lc

sh.o.prof:
	cp sh.c sh.prof.c
	cc -c ${CFLAGS} -DPROF sh.prof.c

# .DEFAULT:
# 	${SCCS} get $<

# need an old doprnt, whose output we can trap
doprnt.o: doprnt.c
	${CC} -c ${CFLAGS} doprnt.c

# strings.o and sh.init.o are specially processed to be shared
#strings.o: strings
strings.o:
	${XSTR}
	${CC} -c -R xs.c
	mv xs.o strings.o

sh.init.o:
	${CC} -E ${CFLAGS} sh.init.c | ${XSTR} -c -
	${CC} ${CFLAGS} -c -R x.c
	mv x.o sh.init.o
	
lint:
	lint ${CFLAGS} sh*.c

print:
	@@pr READ_ME
	@@pr makefile makefile.*
	@@(size -l a.out; size *.o) | pr -h SIZES
	@@${CXREF} sh*.c | pr -h XREF
	@@ls -l | pr 
	@@pr sh*.h [a-rt-z]*.h sh*.c alloc.c

vprint:
	@@pr -l84 READ_ME TODO
	@@pr -l84 makefile makefile.*
	@@(size -l a.out; size *.o) | pr -l84 -h SIZES
	@@${CXREF} sh*.c | pr -l84 -h XREF
	@@ls -l | pr -l84
	@@${CXREF} sh*.c | pr -l84 -h XREF
	@@pr -l84 sh*.h [a-rt-z]*.h sh*.c alloc.c

vgrind:
	@@cp /dev/null index
	@@for i in *.h; do vgrind -t -h "C Shell" $$i >/crp/bill/csh/$$i.t; done
	@@for i in *.c; do vgrind -t -h "C Shell" $$i >/crp/bill/csh/$$i.t; done
	@@vgrind -t -x -h Index index >/crp/bill/csh/index.t

install: csh sh.local.h
	install -s csh ${DESTDIR}/bin/csh

clean:
	${RM} -f a.out strings x.c xs.c csh errs
	${RM} -f *.o sh.prof.c

tags:	/tmp
	${CTAGS} sh*.c


alloc.c:	sh.local.h
getpwent.c:	/usr/include/pwd.h
getpwnam.c:	/usr/include/pwd.h
getpwuid.c:	/usr/include/pwd.h
sh.c:		sh.h sh.local.h
sh.c:		/usr/include/sys/ioctl.h
sh.c:		/usr/include/pwd.h
sh.dir.c:	sh.h
sh.dir.c:	sh.dir.h
sh.dol.c:	sh.h sh.local.h
sh.err.c:	sh.h sh.local.h
sh.err.c:	/usr/include/sys/ioctl.h
sh.exec.c:	sh.h sh.local.h
sh.exec.c:	/usr/include/sys/dir.h
sh.exp.c:	sh.h sh.local.h
sh.func.c:	sh.h sh.local.h
sh.func.c:	/usr/include/sys/ioctl.h
sh.glob.c:	sh.h sh.local.h
sh.glob.c:	/usr/include/sys/dir.h
sh.hist.c:	sh.h sh.local.h
sh.init.c:	sh.local.h
sh.lex.c:	sh.h sh.local.h
sh.lex.c:	/usr/include/sgtty.h
sh.misc.c:	sh.h sh.local.h
sh.parse.c:	sh.h sh.local.h
sh.print.c:	sh.h sh.local.h
sh.print.c:	/usr/include/sys/ioctl.h
sh.proc.c:	sh.h sh.local.h
sh.proc.c:	sh.dir.h
sh.proc.c:	sh.proc.h
sh.proc.c:	/usr/include/sys/wait.h
sh.proc.c:	/usr/include/sys/ioctl.h
sh.sem.c:	sh.h sh.local.h
sh.sem.c:	sh.proc.h
sh.sem.c:	/usr/include/sys/ioctl.h
sh.set.c:	sh.h sh.local.h
sh.sig.c:	/usr/include/signal.h
sh.time.c:	sh.h sh.local.h
@


1.2
log
@added dependence lines for eveybody (I think)
@
text
@d2 1
a2 1
# $Header: Makefile,v 1.1 86/02/28 15:34:26 root Exp $
d5 3
d39 1
a39 1
csh: ${OBJS} sh.local.h
d111 1
a111 1
sh.c:		sh.h
d116 2
a117 2
sh.dol.c:	sh.h
sh.err.c:	sh.h
d119 1
a119 1
sh.exec.c:	sh.h
d121 2
a122 2
sh.exp.c:	sh.h
sh.func.c:	sh.h
d124 1
a124 1
sh.glob.c:	sh.h
d126 1
a126 10
sh.h:		sh.local.h
sh.h:		/usr/include/sys/time.h
sh.h:		/usr/include/sys/resource.h
sh.h:		/usr/include/sys/param.h
sh.h:		/usr/include/sys/stat.h
sh.h:		/usr/include/errno.h
sh.h:		/usr/include/setjmp.h
sh.h:		/usr/include/signal.h
sh.h:		/usr/include/sys/times.h
sh.hist.c:	sh.h
d128 1
a128 1
sh.lex.c:	sh.h
d130 3
a132 3
sh.misc.c:	sh.h
sh.parse.c:	sh.h
sh.print.c:	sh.h
d134 1
a134 1
sh.proc.c:	sh.h
d139 1
a139 1
sh.sem.c:	sh.h
d142 1
a142 1
sh.set.c:	sh.h
d144 1
a144 1
sh.time.c:	sh.h
@


1.1
log
@Initial revision
@
text
@d2 1
a2 1
# $Header$
d4 4
a7 1
# $Log$
d102 49
@
