Makefile revision 1.18
11.18Sfair#	$NetBSD: Makefile,v 1.18 1998/04/08 22:38:18 fair Exp $
21.9Scgd#	@(#)Makefile	8.1 (Berkeley) 5/31/93
31.6Smycroft#
41.1Scgd# C Shell with process control; VM/UNIX VAX Makefile
51.1Scgd# Bill Joy UC Berkeley; Jim Kulp IIASA, Austria
61.1Scgd#
71.17Slukem# To profile, put -DPROF in DFLAGS and -pg in CFLAGS, and recompile.
81.1Scgd
91.1ScgdPROG=	csh
101.6SmycroftDFLAGS=-DBUILTIN -DFILEC -DNLS -DSHORT_STRINGS
111.15SchristosCPPFLAGS+=-I${.CURDIR} -I. ${DFLAGS}
121.1ScgdSRCS=	alloc.c char.c const.c csh.c dir.c dol.c err.c exec.c exp.c file.c \
131.6Smycroft	func.c glob.c hist.c init.c lex.c misc.c parse.c printf.c proc.c \
141.18Sfair	sem.c set.c str.c strpct.c time.c
151.12Sgwr.PATH:	${.CURDIR}/../../usr.bin/printf
161.1Scgd
171.1ScgdMLINKS=	csh.1 limit.1 csh.1 alias.1 csh.1 bg.1 csh.1 dirs.1 csh.1 fg.1 \
181.1Scgd	csh.1 foreach.1 csh.1 history.1 csh.1 jobs.1 csh.1 popd.1 \
191.1Scgd	csh.1 pushd.1 csh.1 rehash.1 csh.1 repeat.1 csh.1 suspend.1 \
201.1Scgd	csh.1 stop.1 csh.1 source.1
211.13SchristosCLEANFILES+=errnum.h const.h
221.1Scgd
231.13Schristosconst.h: errnum.h
241.1Scgd
251.13Schristoserrnum.h: err.c
261.13Schristos	@rm -f ${.TARGET}
271.13Schristos	@echo '/* Do not edit this file, make creates it. */' > ${.TARGET}
281.13Schristos	@echo '#ifndef _h_sh_errnum' >> ${.TARGET}
291.13Schristos	@echo '#define _h_sh_errnum' >> ${.TARGET}
301.13Schristos	egrep 'ERR_' ${.ALLSRC} | egrep '^#define' >> ${.TARGET}
311.13Schristos	@echo '#endif /* _h_sh_errnum */' >> ${.TARGET}
321.1Scgd
331.1Scgdconst.h: const.c
341.13Schristos	@rm -f ${.TARGET}
351.13Schristos	@echo '/* Do not edit this file, make creates it. */' > ${.TARGET}
361.15Schristos	${CC} -E ${CPPFLAGS} ${.ALLSRC} | egrep 'Char STR' | \
371.1Scgd	    sed -e 's/Char \([a-zA-Z0-9_]*\)\(.*\)/extern Char \1[];/' | \
381.13Schristos	    sort >> ${.TARGET}
391.1Scgd
401.13Schristos.depend alloc.o: const.h errnum.h 
411.17Slukem
421.17Slukemalloc.o const.o csh.o dir.o dol.o err.o exec.o exp.o file.o func.o glob.o \
431.17Slukem    hist.o init.o lex.o misc.o parse.o proc.o sem.o set.o str.o time.o: const.h
441.7Scgd
451.7Scgd.if make(install)
461.16SmycroftSUBDIR+=USD.doc
471.7Scgd.endif
481.1Scgd
491.1Scgd.include <bsd.prog.mk>
501.16Smycroft.include <bsd.subdir.mk>
51