Makefile revision 1.5
1#	from: @(#)Makefile	5.24 (Berkeley) 7/1/91
2#	$Id: Makefile,v 1.5 1993/08/01 05:47:53 mycroft Exp $
3
4# C Shell with process control; VM/UNIX VAX Makefile
5# Bill Joy UC Berkeley; Jim Kulp IIASA, Austria
6#
7# To profile, put -DPROF in DEFS and -pg in CFLAGS, and recompile.
8
9PROG=	csh
10CFLAGS+=-fstrength-reduce -DFILEC -DNLS -DSHORT_STRINGS -I.
11SRCS=	alloc.c char.c const.c csh.c dir.c dol.c err.c exec.c exp.c file.c \
12	func.c glob.c hist.c init.c lex.c misc.c parse.c print.c printf.c \
13	proc.c sem.c set.c str.c time.c
14
15MAN1=	csh.0
16MLINKS=	csh.1 limit.1 csh.1 alias.1 csh.1 bg.1 csh.1 dirs.1 csh.1 fg.1 \
17	csh.1 foreach.1 csh.1 history.1 csh.1 jobs.1 csh.1 popd.1 \
18	csh.1 pushd.1 csh.1 rehash.1 csh.1 repeat.1 csh.1 suspend.1 \
19	csh.1 stop.1 csh.1 source.1
20CLEANFILES+=err.h const.h
21
22const.h: err.h
23
24err.h: err.c
25	@rm -f $@
26	@echo '/* Do not edit this file, make creates it. */' > $@
27	@echo '#ifndef _h_sh_err' >> $@
28	@echo '#define _h_sh_err' >> $@
29	egrep 'ERR_' ${.CURDIR}/$*.c | egrep '^#define' >> $@
30	@echo '#endif /* _h_sh_err */' >> $@
31
32const.h: const.c
33	@rm -f $@
34	@echo '/* Do not edit this file, make creates it. */' > $@
35	${CC} -E ${CFLAGS} ${.CURDIR}/$*.c | egrep 'Char STR' | \
36	    sed -e 's/Char \([a-zA-Z0-9_]*\)\(.*\)/extern Char \1[];/' | \
37	    sort >> $@
38
39.depend alloc.o: const.h err.h
40
41.include <bsd.prog.mk>
42