Makefile revision 27969
1254885Sdumbbell#	$Id: Makefile,v 1.8 1997/08/07 21:42:01 steve Exp $
2254885Sdumbbell#	@(#)Makefile	8.1 (Berkeley) 5/31/93
3254885Sdumbbell#
4254885Sdumbbell# C Shell with process control; VM/UNIX VAX Makefile
5254885Sdumbbell# Bill Joy UC Berkeley; Jim Kulp IIASA, Austria
6254885Sdumbbell#
7254885Sdumbbell# To profile, put -DPROF in DEFS and -pg in CFLAGS, and recompile.
8254885Sdumbbell
9254885SdumbbellPROG=	csh
10254885SdumbbellDFLAGS=-DBUILTIN -DFILEC -DNLS -DSHORT_STRINGS
11254885SdumbbellCFLAGS+=-I${.CURDIR} -I. ${DFLAGS}
12254885SdumbbellSRCS=	alloc.c char.c const.c csh.c dir.c dol.c err.c exec.c exp.c file.c \
13254885Sdumbbell	func.c glob.c hist.c init.c lex.c misc.c parse.c printf.c proc.c \
14254885Sdumbbell	sem.c set.c str.c time.c const.h errnum.h
15254885Sdumbbell.PATH:	${.CURDIR}/../../usr.bin/printf
16254885Sdumbbell
17254885SdumbbellMAN1=	csh.1
18254885SdumbbellMLINKS=	csh.1 limit.1 csh.1 alias.1 csh.1 bg.1 csh.1 dirs.1 csh.1 fg.1 \
19254885Sdumbbell	csh.1 foreach.1 csh.1 history.1 csh.1 jobs.1 csh.1 popd.1 \
20254885Sdumbbell	csh.1 pushd.1 csh.1 rehash.1 csh.1 repeat.1 csh.1 suspend.1 \
21254885Sdumbbell	csh.1 stop.1 csh.1 source.1
22254885SdumbbellCLEANFILES+=const.h errnum.h
23254885Sdumbbell
24254885Sdumbbellconst.h: errnum.h
25254885Sdumbbell
26254885Sdumbbellerrnum.h: err.c
27254885Sdumbbell	@rm -f ${.TARGET}
28254885Sdumbbell	@echo '/* Do not edit this file, make creates it. */' > ${.TARGET}
29254885Sdumbbell	@echo '#ifndef _h_sh_error' >> ${.TARGET}
30254885Sdumbbell	@echo '#define _h_sh_error' >> ${.TARGET}
31254885Sdumbbell	egrep 'ERR_' ${.ALLSRC} | egrep '^#define' >> ${.TARGET}
32254885Sdumbbell	@echo '#endif /* _h_sh_error */' >> ${.TARGET}
33254885Sdumbbell
34254885Sdumbbellconst.h: const.c
35254885Sdumbbell	@rm -f ${.TARGET}
36254885Sdumbbell	@echo '/* Do not edit this file, make creates it. */' > ${.TARGET}
37254885Sdumbbell	${CC} -E ${CFLAGS} ${.ALLSRC} | egrep 'Char STR' | \
38254885Sdumbbell	    sed -e 's/Char \([a-zA-Z0-9_]*\)\(.*\)/extern Char \1[];/' | \
39254885Sdumbbell	    sort >> ${.TARGET}
40254885Sdumbbell
41254885Sdumbbell.include <bsd.prog.mk>
42254885Sdumbbell