Makefile revision 1.5
11.5Smycroft#	from: @(#)Makefile	5.24 (Berkeley) 7/1/91
21.5Smycroft#	$Id: Makefile,v 1.5 1993/08/01 05:47:53 mycroft Exp $
31.5Smycroft
41.1Scgd# C Shell with process control; VM/UNIX VAX Makefile
51.1Scgd# Bill Joy UC Berkeley; Jim Kulp IIASA, Austria
61.1Scgd#
71.1Scgd# To profile, put -DPROF in DEFS and -pg in CFLAGS, and recompile.
81.1Scgd
91.1ScgdPROG=	csh
101.4SprovenCFLAGS+=-fstrength-reduce -DFILEC -DNLS -DSHORT_STRINGS -I.
111.1ScgdSRCS=	alloc.c char.c const.c csh.c dir.c dol.c err.c exec.c exp.c file.c \
121.1Scgd	func.c glob.c hist.c init.c lex.c misc.c parse.c print.c printf.c \
131.1Scgd	proc.c sem.c set.c str.c time.c
141.1Scgd
151.1ScgdMAN1=	csh.0
161.1ScgdMLINKS=	csh.1 limit.1 csh.1 alias.1 csh.1 bg.1 csh.1 dirs.1 csh.1 fg.1 \
171.1Scgd	csh.1 foreach.1 csh.1 history.1 csh.1 jobs.1 csh.1 popd.1 \
181.1Scgd	csh.1 pushd.1 csh.1 rehash.1 csh.1 repeat.1 csh.1 suspend.1 \
191.1Scgd	csh.1 stop.1 csh.1 source.1
201.1ScgdCLEANFILES+=err.h const.h
211.1Scgd
221.1Scgdconst.h: err.h
231.1Scgd
241.1Scgderr.h: err.c
251.1Scgd	@rm -f $@
261.1Scgd	@echo '/* Do not edit this file, make creates it. */' > $@
271.1Scgd	@echo '#ifndef _h_sh_err' >> $@
281.1Scgd	@echo '#define _h_sh_err' >> $@
291.1Scgd	egrep 'ERR_' ${.CURDIR}/$*.c | egrep '^#define' >> $@
301.1Scgd	@echo '#endif /* _h_sh_err */' >> $@
311.1Scgd
321.1Scgdconst.h: const.c
331.1Scgd	@rm -f $@
341.1Scgd	@echo '/* Do not edit this file, make creates it. */' > $@
351.1Scgd	${CC} -E ${CFLAGS} ${.CURDIR}/$*.c | egrep 'Char STR' | \
361.1Scgd	    sed -e 's/Char \([a-zA-Z0-9_]*\)\(.*\)/extern Char \1[];/' | \
371.1Scgd	    sort >> $@
381.1Scgd
391.1Scgd.depend alloc.o: const.h err.h
401.1Scgd
411.1Scgd.include <bsd.prog.mk>
42