Makefile revision 59393
1107120Sjulian# $FreeBSD: head/bin/csh/Makefile 59393 2000-04-19 15:15:19Z obrien $ 2107120Sjulian# @(#)Makefile 8.1 (Berkeley) 5/31/93 3139823Simp# 4139823Simp# C Shell with process control; VM/UNIX VAX Makefile 5139823Simp# Bill Joy UC Berkeley; Jim Kulp IIASA, Austria 6107120Sjulian# 7107120Sjulian# To profile, put -DPROF in DEFS and -pg in CFLAGS, and recompile. 8107120Sjulian 9107120SjulianTCSHDIR= ${.CURDIR}/../../contrib/tcsh 10107120Sjulian.PATH: ${TCSHDIR} 11107120Sjulian 12107120SjulianPROG= csh 13107120SjulianDFLAGS= -D_PATH_TCSHELL='"${DESTDIR}/bin/${PROG}"' 14107120SjulianCFLAGS+= -I${TCSHDIR} -I${.CURDIR} -I. ${DFLAGS} 15107120SjulianSRCS= sh.c sh.dir.c sh.dol.c sh.err.c sh.exec.c sh.char.c \ 16107120Sjulian sh.exp.c sh.file.c sh.func.c sh.glob.c sh.hist.c sh.init.c \ 17107120Sjulian sh.lex.c sh.misc.c sh.parse.c sh.print.c sh.proc.c sh.sem.c \ 18107120Sjulian sh.set.c sh.time.c sh.h sh.char.h sh.dir.h sh.proc.h 19107120SjulianSRCS+= sh.decls.h glob.c glob.h mi.termios.c mi.wait.h mi.varargs.h 20107120SjulianSRCS+= tw.decls.h tw.h tw.help.c tw.init.c tw.parse.c tw.spell.c \ 21107120Sjulian tw.comp.c tw.color.c 22107120SjulianSRCS+= ed.chared.c ed.decls.h ed.defns.c ed.h ed.init.c ed.inputl.c \ 23107120Sjulian ed.refresh.c ed.screen.c ed.xmap.c ed.term.c ed.term.h 24107120SjulianSRCS+= tc.alloc.c tc.bind.c tc.const.c tc.decls.h tc.disc.c \ 25107120Sjulian tc.func.c tc.os.c tc.os.h tc.printf.c tc.prompt.c \ 26107120Sjulian tc.sched.c tc.sig.c tc.sig.h tc.str.c sh.types.h tc.vers.c tc.wait.h \ 27107120Sjulian tc.who.c tc.h 28107120SjulianSRCS+= tc.defs.c 29107120Sjulian 30114878SjulianMAN1= csh.1 31107120Sjulian# MLINKS for Shell built in commands for which there are no userland 32107120Sjulian# utilities of the same name are handled with the associated manpage, 33107120Sjulian# builtin.1 in share/man/man1/. 34107120Sjulian 35107120SjulianDPADD+= ${LIBNCURSES} ${LIBCRYPT} 36107120SjulianLDADD+= -lncurses -lcrypt 37107120Sjulian 38107120SjulianLINKS= ${BINDIR}/csh ${BINDIR}/tcsh 39107120Sjulian 40107120Sjuliancsh.1: tcsh.man 41107120Sjulian ln -sf ${.ALLSRC} ${.TARGET} 42107120Sjulian 43107120SjulianGENHDRS+= ed.defns.h tc.const.h sh.err.h 44107120SjulianSRCS+= ${GENHDRS} 45107120SjulianCLEANFILES+= ${GENHDRS} 46107120Sjulian 47107120Sjulianed.defns.h: ed.defns.c 48107120Sjulian @rm -f ${.TARGET} 49107120Sjulian @echo '/* Do not edit this file, make creates it. */' > ${.TARGET} 50107120Sjulian @echo '#ifndef _h_ed_defns' >> ${.TARGET} 51107120Sjulian @echo '#define _h_ed_defns' >> ${.TARGET} 52107120Sjulian grep '[FV]_' ${TCSHDIR}/ed.defns.c | grep '^#define' >> ${.TARGET} 53107120Sjulian @echo '#endif /* _h_ed_defns */' >> ${.TARGET} 54107120Sjulian 55107120Sjuliansh.err.h: sh.err.c 56107120Sjulian @rm -f ${.TARGET} 57107120Sjulian @echo '/* Do not edit this file, make creates it. */' > ${.TARGET} 58107120Sjulian @echo '#ifndef _h_sh_err' >> ${.TARGET} 59107120Sjulian @echo '#define _h_sh_err' >> ${.TARGET} 60107120Sjulian egrep 'ERR_' ${.ALLSRC} | egrep '^#define' >> ${.TARGET} 61107120Sjulian @echo '#endif /* _h_sh_err */' >> ${.TARGET} 62107120Sjulian 63107120Sjuliantc.const.h: tc.const.c sh.char.h config.h config_f.h sh.types.h sh.err.h 64107120Sjulian @rm -f ${.TARGET} 65107120Sjulian @echo '/* Do not edit this file, make creates it. */' > ${.TARGET} 66107120Sjulian @echo '#ifndef _h_tc_const' >> ${.TARGET} 67107120Sjulian @echo '#define _h_tc_const' >> ${.TARGET} 68107120Sjulian ${CC} -E ${CFLAGS} ${.ALLSRC} -D_h_tc_const | egrep 'Char STR' | \ 69107120Sjulian sed -e 's/Char \([a-zA-Z0-9_]*\)\(.*\)/extern Char \1[];/' | \ 70107120Sjulian sort >> ${.TARGET} 71107120Sjulian @echo '#endif /* _h_tc_const */' >> ${.TARGET} 72107120Sjulian 73107120Sjulian.include <bsd.prog.mk> 74107120Sjulian