Makefile revision 27965
1109998Smarkm#	$Id: Makefile,v 1.7 1997/02/22 14:01:36 peter Exp $
2109998Smarkm#	@(#)Makefile	8.1 (Berkeley) 5/31/93
3109998Smarkm#
4109998Smarkm# C Shell with process control; VM/UNIX VAX Makefile
5109998Smarkm# Bill Joy UC Berkeley; Jim Kulp IIASA, Austria
6109998Smarkm#
7109998Smarkm# To profile, put -DPROF in DEFS and -pg in CFLAGS, and recompile.
8109998Smarkm
9280304SjkimPROG=	csh
10109998SmarkmDFLAGS=-DBUILTIN -DFILEC -DNLS -DSHORT_STRINGS
11109998SmarkmCFLAGS+=-I${.CURDIR} -I. ${DFLAGS}
12109998SmarkmSRCS=	alloc.c char.c const.c csh.c dir.c dol.c err.c exec.c exp.c file.c \
13109998Smarkm	func.c glob.c hist.c init.c lex.c misc.c parse.c printf.c proc.c \
14109998Smarkm	sem.c set.c str.c time.c const.h errnum.h
15109998Smarkm.PATH:	${.CURDIR}/../../usr.bin/printf
16109998Smarkm
17109998SmarkmMAN1=	csh.1
18109998SmarkmMLINKS=	csh.1 limit.1 csh.1 alias.1 csh.1 bg.1 csh.1 dirs.1 csh.1 fg.1 \
19109998Smarkm	csh.1 foreach.1 csh.1 history.1 csh.1 jobs.1 csh.1 popd.1 \
20109998Smarkm	csh.1 pushd.1 csh.1 rehash.1 csh.1 repeat.1 csh.1 suspend.1 \
21109998Smarkm	csh.1 stop.1 csh.1 source.1
22109998SmarkmCLEANFILES+=const.h errnum.h
23109998Smarkm
24109998Smarkmconst.h: errnum.h
25109998Smarkm
26109998Smarkmerrnum.h: err.c
27109998Smarkm	@rm -f ${.TARGET}
28109998Smarkm	@echo '/* Do not edit this file, make creates it. */' > ${.TARGET}
29109998Smarkm	@echo '#ifndef _h_sh_error' >> ${.TARGET}
30109998Smarkm	@echo '#define _h_sh_error' >> ${.TARGET}
31109998Smarkm	egrep 'ERR_' ${.ALLSRC} | egrep '^#define' >> ${.TARGET}
32109998Smarkm	@echo '#endif /* _h_sh_error */' >> ${.TARGET}
33109998Smarkm
34109998Smarkmconst.h: const.c
35109998Smarkm	@rm -f $@
36109998Smarkm	@echo '/* Do not edit this file, make creates it. */' > $@
37109998Smarkm	${CC} -E ${CFLAGS} ${.CURDIR}/$*.c | egrep 'Char STR' | \
38109998Smarkm	    sed -e 's/Char \([a-zA-Z0-9_]*\)\(.*\)/extern Char \1[];/' | \
39109998Smarkm	    sort >> $@
40109998Smarkm
41109998Smarkm.include <bsd.prog.mk>
42109998Smarkm