Makefile revision 90166
150471Speter# $FreeBSD: head/bin/csh/Makefile 90166 2002-02-04 02:49:19Z kris $ 21556Srgrimes# @(#)Makefile 8.1 (Berkeley) 5/31/93 31556Srgrimes# 41556Srgrimes# C Shell with process control; VM/UNIX VAX Makefile 51556Srgrimes# Bill Joy UC Berkeley; Jim Kulp IIASA, Austria 61556Srgrimes# 71556Srgrimes# To profile, put -DPROF in DEFS and -pg in CFLAGS, and recompile. 81556Srgrimes 959576SobrienTCSHDIR= ${.CURDIR}/../../contrib/tcsh 1059355Sobrien.PATH: ${TCSHDIR} 1159355Sobrien 121556SrgrimesPROG= csh 1359432SacheSUBDIR= nls 1469551SacheDFLAGS= -D_PATH_TCSHELL='"/bin/${PROG}"' 1569640SobrienCFLAGS+= -I. -I${.CURDIR} -I${TCSHDIR} ${DFLAGS} 1687323SobrienWARNS= 0 1790166SkrisWFORMAT=0 1859355SobrienSRCS= sh.c sh.dir.c sh.dol.c sh.err.c sh.exec.c sh.char.c \ 1959355Sobrien sh.exp.c sh.file.c sh.func.c sh.glob.c sh.hist.c sh.init.c \ 2059355Sobrien sh.lex.c sh.misc.c sh.parse.c sh.print.c sh.proc.c sh.sem.c \ 2169415Sache sh.set.c sh.time.c sh.char.h sh.dir.h sh.proc.h sh.h 2259355SobrienSRCS+= sh.decls.h glob.c glob.h mi.termios.c mi.wait.h mi.varargs.h 2359355SobrienSRCS+= tw.decls.h tw.h tw.help.c tw.init.c tw.parse.c tw.spell.c \ 2459355Sobrien tw.comp.c tw.color.c 2559355SobrienSRCS+= ed.chared.c ed.decls.h ed.defns.c ed.h ed.init.c ed.inputl.c \ 2659355Sobrien ed.refresh.c ed.screen.c ed.xmap.c ed.term.c ed.term.h 2759355SobrienSRCS+= tc.alloc.c tc.bind.c tc.const.c tc.decls.h tc.disc.c \ 2859355Sobrien tc.func.c tc.os.c tc.os.h tc.printf.c tc.prompt.c \ 2959355Sobrien tc.sched.c tc.sig.c tc.sig.h tc.str.c sh.types.h tc.vers.c tc.wait.h \ 3059355Sobrien tc.who.c tc.h 3169415SacheGENHDRS= ed.defns.h sh.err.h tc.const.h tc.defs.c 3260599SbdeSRCS+= ${GENHDRS} 331556Srgrimes 3460029SjkoshyMLINKS= csh.1 tcsh.1 3551090Ssheldonh# MLINKS for Shell built in commands for which there are no userland 3651090Ssheldonh# utilities of the same name are handled with the associated manpage, 3751090Ssheldonh# builtin.1 in share/man/man1/. 3851090Ssheldonh 3962759SacheDPADD= ${LIBTERMCAP} ${LIBCRYPT} 4062759SacheLDADD= -ltermcap -lcrypt 411556Srgrimes 4259393SobrienLINKS= ${BINDIR}/csh ${BINDIR}/tcsh 4359393Sobrien 4469415SacheCLEANFILES= ${GENHDRS} gethost csh.1 4560599Sbde 4659355Sobriencsh.1: tcsh.man 4759355Sobrien ln -sf ${.ALLSRC} ${.TARGET} 481556Srgrimes 4969551Sachebuild-tools: gethost 5069551Sache 5169415Sachegethost: gethost.c sh.err.h tc.const.h sh.h 5269415Sache @rm -f ${.TARGET} 5369415Sache ${CC} -o gethost ${LDFLAGS} ${CFLAGS} ${TCSHDIR}/gethost.c 5469415Sache 5569415Sachetc.defs.c: gethost ${.CURDIR}/host.defs 5669415Sache @rm -f ${.TARGET} 5769415Sache @echo "/* Do not edit this file, make creates it */" > ${.TARGET} 5869415Sache ./gethost ${.CURDIR}/host.defs >> ${.TARGET} 5969415Sache 6059355Sobriened.defns.h: ed.defns.c 6127965Ssteve @rm -f ${.TARGET} 6227965Ssteve @echo '/* Do not edit this file, make creates it. */' > ${.TARGET} 6359355Sobrien @echo '#ifndef _h_ed_defns' >> ${.TARGET} 6459355Sobrien @echo '#define _h_ed_defns' >> ${.TARGET} 6559355Sobrien grep '[FV]_' ${TCSHDIR}/ed.defns.c | grep '^#define' >> ${.TARGET} 6659355Sobrien @echo '#endif /* _h_ed_defns */' >> ${.TARGET} 6759355Sobrien 6859355Sobriensh.err.h: sh.err.c 6959355Sobrien @rm -f ${.TARGET} 7059355Sobrien @echo '/* Do not edit this file, make creates it. */' > ${.TARGET} 7159355Sobrien @echo '#ifndef _h_sh_err' >> ${.TARGET} 7259355Sobrien @echo '#define _h_sh_err' >> ${.TARGET} 7369415Sache grep 'ERR_' ${.ALLSRC} | grep '^#define' >> ${.TARGET} 7459355Sobrien @echo '#endif /* _h_sh_err */' >> ${.TARGET} 751556Srgrimes 7659355Sobrientc.const.h: tc.const.c sh.char.h config.h config_f.h sh.types.h sh.err.h 7727969Ssteve @rm -f ${.TARGET} 7827969Ssteve @echo '/* Do not edit this file, make creates it. */' > ${.TARGET} 7959355Sobrien @echo '#ifndef _h_tc_const' >> ${.TARGET} 8059355Sobrien @echo '#define _h_tc_const' >> ${.TARGET} 8169415Sache ${CC} -E ${CFLAGS} ${.ALLSRC} -D_h_tc_const | grep 'Char STR' | \ 821556Srgrimes sed -e 's/Char \([a-zA-Z0-9_]*\)\(.*\)/extern Char \1[];/' | \ 8327969Ssteve sort >> ${.TARGET} 8459355Sobrien @echo '#endif /* _h_tc_const */' >> ${.TARGET} 851556Srgrimes 861556Srgrimes.include <bsd.prog.mk> 87