Makefile revision 59355
1245163Serwin# $FreeBSD: head/bin/csh/Makefile 59355 2000-04-18 07:31:36Z obrien $ 2174187Sdougb# @(#)Makefile 8.1 (Berkeley) 5/31/93 3174187Sdougb# 4174187Sdougb# C Shell with process control; VM/UNIX VAX Makefile 5174187Sdougb# Bill Joy UC Berkeley; Jim Kulp IIASA, Austria 6174187Sdougb# 7174187Sdougb# To profile, put -DPROF in DEFS and -pg in CFLAGS, and recompile. 8174187Sdougb 9174187SdougbTCSHDIR= ${.CURDIR}/../../contrib/tcsh 10174187Sdougb.PATH: ${TCSHDIR} 11174187Sdougb 12174187SdougbPROG= csh 13174187SdougbDFLAGS= -D_PATH_TCSHELL='"${DESTDIR}/bin/${PROG}"' 14174187SdougbCFLAGS+= -I${TCSHDIR} -I${.CURDIR} -I. ${DFLAGS} 15234010SdougbSRCS= sh.c sh.dir.c sh.dol.c sh.err.c sh.exec.c sh.char.c \ 16174187Sdougb sh.exp.c sh.file.c sh.func.c sh.glob.c sh.hist.c sh.init.c \ 17174187Sdougb sh.lex.c sh.misc.c sh.parse.c sh.print.c sh.proc.c sh.sem.c \ 18174187Sdougb sh.set.c sh.time.c sh.h sh.char.h sh.dir.h sh.proc.h 19174187SdougbSRCS+= sh.decls.h glob.c glob.h mi.termios.c mi.wait.h mi.varargs.h 20174187SdougbSRCS+= tw.decls.h tw.h tw.help.c tw.init.c tw.parse.c tw.spell.c \ 21174187Sdougb tw.comp.c tw.color.c 22174187SdougbSRCS+= ed.chared.c ed.decls.h ed.defns.c ed.h ed.init.c ed.inputl.c \ 23174187Sdougb ed.refresh.c ed.screen.c ed.xmap.c ed.term.c ed.term.h 24174187SdougbSRCS+= tc.alloc.c tc.bind.c tc.const.c tc.decls.h tc.disc.c \ 25174187Sdougb tc.func.c tc.os.c tc.os.h tc.printf.c tc.prompt.c \ 26174187Sdougb tc.sched.c tc.sig.c tc.sig.h tc.str.c sh.types.h tc.vers.c tc.wait.h \ 27174187Sdougb tc.who.c tc.h 28174187SdougbSRCS+= tc.defs.c 29174187Sdougb 30174187SdougbMAN1= csh.1 31174187Sdougb# MLINKS for Shell built in commands for which there are no userland 32174187Sdougb# utilities of the same name are handled with the associated manpage, 33174187Sdougb# builtin.1 in share/man/man1/. 34174187Sdougb 35174187SdougbDPADD+= ${LIBNCURSES} ${LIBCRYPT} 36174187SdougbLDADD+= -lncurses -lcrypt 37 38csh.1: tcsh.man 39 ln -sf ${.ALLSRC} ${.TARGET} 40 41GENHDRS+= ed.defns.h tc.const.h sh.err.h 42SRCS+= ${GENHDRS} 43CLEANFILES+= ${GENHDRS} 44 45ed.defns.h: ed.defns.c 46 @rm -f ${.TARGET} 47 @echo '/* Do not edit this file, make creates it. */' > ${.TARGET} 48 @echo '#ifndef _h_ed_defns' >> ${.TARGET} 49 @echo '#define _h_ed_defns' >> ${.TARGET} 50 grep '[FV]_' ${TCSHDIR}/ed.defns.c | grep '^#define' >> ${.TARGET} 51 @echo '#endif /* _h_ed_defns */' >> ${.TARGET} 52 53sh.err.h: sh.err.c 54 @rm -f ${.TARGET} 55 @echo '/* Do not edit this file, make creates it. */' > ${.TARGET} 56 @echo '#ifndef _h_sh_err' >> ${.TARGET} 57 @echo '#define _h_sh_err' >> ${.TARGET} 58 egrep 'ERR_' ${.ALLSRC} | egrep '^#define' >> ${.TARGET} 59 @echo '#endif /* _h_sh_err */' >> ${.TARGET} 60 61tc.const.h: tc.const.c sh.char.h config.h config_f.h sh.types.h sh.err.h 62 @rm -f ${.TARGET} 63 @echo '/* Do not edit this file, make creates it. */' > ${.TARGET} 64 @echo '#ifndef _h_tc_const' >> ${.TARGET} 65 @echo '#define _h_tc_const' >> ${.TARGET} 66 ${CC} -E ${CFLAGS} ${.ALLSRC} -D_h_tc_const | egrep 'Char STR' | \ 67 sed -e 's/Char \([a-zA-Z0-9_]*\)\(.*\)/extern Char \1[];/' | \ 68 sort >> ${.TARGET} 69 @echo '#endif /* _h_tc_const */' >> ${.TARGET} 70 71.include <bsd.prog.mk> 72