Makefile revision 1.35
11.35Schristos#	$NetBSD: Makefile,v 1.35 2013/01/22 22:40:31 christos 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.19Slukem# To profile, put -DPROF in DFLAGS and -pg in COPTS, and recompile.
81.1Scgd
91.20Slukem.include <bsd.own.mk>
101.20Slukem
111.1ScgdPROG=	csh
121.6SmycroftDFLAGS=-DBUILTIN -DFILEC -DNLS -DSHORT_STRINGS
131.34Schristos# - Not integrated with history
141.34Schristos# - Does not handle escaped prompts.
151.34Schristos# - Does not do completion
161.34Schristos# DFLAGS+=-DEDIT
171.15SchristosCPPFLAGS+=-I${.CURDIR} -I. ${DFLAGS}
181.1ScgdSRCS=	alloc.c char.c const.c csh.c dir.c dol.c err.c exec.c exp.c file.c \
191.6Smycroft	func.c glob.c hist.c init.c lex.c misc.c parse.c printf.c proc.c \
201.33Schristos	sem.c set.c str.c time.c
211.20Slukem.PATH:	${NETBSDSRCDIR}/usr.bin/printf
221.1Scgd
231.1ScgdMLINKS=	csh.1 limit.1 csh.1 alias.1 csh.1 bg.1 csh.1 dirs.1 csh.1 fg.1 \
241.1Scgd	csh.1 foreach.1 csh.1 history.1 csh.1 jobs.1 csh.1 popd.1 \
251.1Scgd	csh.1 pushd.1 csh.1 rehash.1 csh.1 repeat.1 csh.1 suspend.1 \
261.1Scgd	csh.1 stop.1 csh.1 source.1
271.1Scgd
281.23SlukemDPSRCS+=	errnum.h const.h
291.23SlukemCLEANFILES+=	errnum.h const.h
301.1Scgd
311.13Schristoserrnum.h: err.c
321.26Slukem	${_MKTARGET_CREATE}
331.24Slukem	rm -f ${.TARGET}
341.24Slukem	(\
351.24Slukem	echo '/* Do not edit this file, make creates it. */' ;\
361.24Slukem	echo '#ifndef _h_sh_errnum' ;\
371.24Slukem	echo '#define _h_sh_errnum' ;\
381.24Slukem	egrep 'ERR_' ${.ALLSRC} | egrep '^#define' ;\
391.24Slukem	echo '#endif /* _h_sh_errnum */' ;\
401.24Slukem	) > ${.TARGET}
411.1Scgd
421.24Slukemconst.c: errnum.h
431.1Scgdconst.h: const.c
441.26Slukem	${_MKTARGET_CREATE}
451.24Slukem	rm -f ${.TARGET}
461.24Slukem	echo '/* Do not edit this file, make creates it. */' > ${.TARGET}
471.15Schristos	${CC} -E ${CPPFLAGS} ${.ALLSRC} | egrep 'Char STR' | \
481.29Sapb	    ${TOOL_SED} -e 's/Char \([a-zA-Z0-9_]*\)\(.*\)/extern Char \1[];/' | \
491.13Schristos	    sort >> ${.TARGET}
501.1Scgd
511.7Scgd.if make(install)
521.16SmycroftSUBDIR+=USD.doc
531.7Scgd.endif
541.1Scgd
551.30Smrg# XXX Only GCC 4.1 problem
561.28Sgmcgarry.if defined(HAVE_GCC) && ${HAVE_GCC} == 4 && ${MACHINE_ARCH} == "vax"
571.27SmrgCOPTS.parse.c+=	-O0
581.27Smrg.endif
591.32SjoergCOPTS.err.c = -Wno-format-nonliteral
601.31SchristosCOPTS.printf.c = -Wno-format-nonliteral
611.31SchristosCOPTS.proc.c = -Wno-format-nonliteral
621.33Schristos
631.34Schristos.if 0
641.35SchristosLDADD+=-ledit -lutil
651.35SchristosDPADD+=${LIBEDIT} ${LIBUTIL}
661.35Schristos.else
671.33SchristosLDADD+=-lutil
681.33SchristosDPADD+=${LIBUTIL}
691.34Schristos.endif
701.27Smrg
711.1Scgd.include <bsd.prog.mk>
721.16Smycroft.include <bsd.subdir.mk>
73