Makefile revision 99257
150471Speter# $FreeBSD: head/bin/csh/Makefile 99257 2002-07-02 12:37:09Z ru $ 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 1369551SacheDFLAGS= -D_PATH_TCSHELL='"/bin/${PROG}"' 1469640SobrienCFLAGS+= -I. -I${.CURDIR} -I${TCSHDIR} ${DFLAGS} 1587323SobrienWARNS= 0 1690166SkrisWFORMAT=0 1759355SobrienSRCS= sh.c sh.dir.c sh.dol.c sh.err.c sh.exec.c sh.char.c \ 1859355Sobrien sh.exp.c sh.file.c sh.func.c sh.glob.c sh.hist.c sh.init.c \ 1959355Sobrien sh.lex.c sh.misc.c sh.parse.c sh.print.c sh.proc.c sh.sem.c \ 2069415Sache sh.set.c sh.time.c sh.char.h sh.dir.h sh.proc.h sh.h 2159355SobrienSRCS+= sh.decls.h glob.c glob.h mi.termios.c mi.wait.h mi.varargs.h 2259355SobrienSRCS+= tw.decls.h tw.h tw.help.c tw.init.c tw.parse.c tw.spell.c \ 2359355Sobrien tw.comp.c tw.color.c 2459355SobrienSRCS+= ed.chared.c ed.decls.h ed.defns.c ed.h ed.init.c ed.inputl.c \ 2559355Sobrien ed.refresh.c ed.screen.c ed.xmap.c ed.term.c ed.term.h 2659355SobrienSRCS+= tc.alloc.c tc.bind.c tc.const.c tc.decls.h tc.disc.c \ 2759355Sobrien tc.func.c tc.os.c tc.os.h tc.printf.c tc.prompt.c \ 2859355Sobrien tc.sched.c tc.sig.c tc.sig.h tc.str.c sh.types.h tc.vers.c tc.wait.h \ 2959355Sobrien tc.who.c tc.h 3069415SacheGENHDRS= ed.defns.h sh.err.h tc.const.h tc.defs.c 3160599SbdeSRCS+= ${GENHDRS} 321556Srgrimes 3360029SjkoshyMLINKS= csh.1 tcsh.1 3451090Ssheldonh# MLINKS for Shell built in commands for which there are no userland 3551090Ssheldonh# utilities of the same name are handled with the associated manpage, 3651090Ssheldonh# builtin.1 in share/man/man1/. 3751090Ssheldonh 3862759SacheDPADD= ${LIBTERMCAP} ${LIBCRYPT} 3962759SacheLDADD= -ltermcap -lcrypt 401556Srgrimes 4159393SobrienLINKS= ${BINDIR}/csh ${BINDIR}/tcsh 4259393Sobrien 4369415SacheCLEANFILES= ${GENHDRS} gethost csh.1 4460599Sbde 4590559SmpFILESDIR= ${SHAREDIR}/examples/tcsh 4690559SmpFILES= complete.tcsh csh-mode.el 4790559Smp 4899257SruCATALOGS= et:et_EE.ISO8859-15 \ 4999257Sru finnish:fi_FI.ISO8859-1 \ 5099257Sru french:fr_FR.ISO8859-1 \ 5199257Sru german:de_DE.ISO8859-1 \ 5299257Sru greek:el_GR.ISO8859-7 \ 5399257Sru italian:it_IT.ISO8859-1 \ 5499257Sru ja:ja_JP.eucJP \ 5599257Sru russian:ru_RU.KOI8-R \ 5699257Sru spanish:es_ES.ISO8859-1 \ 5799257Sru ukrainian:uk_UA.KOI8-U 5899257Sru 5999257SruNLSLINKS_fi_FI.ISO8859-1= fi_FI.ISO8859-15 6099257SruNLSLINKS_fr_FR.ISO8859-1= fr_BE.ISO8859-1 fr_BE.ISO8859-15 \ 6199257Sru fr_CA.ISO8859-1 fr_CA.ISO8859-15 fr_CH.ISO8859-1 \ 6299257Sru fr_CH.ISO8859-15 fr_FR.ISO8859-15 6399257SruNLSLINKS_de_DE.ISO8859-1= de_AT.ISO8859-1 de_AT.ISO8859-15 de_CH.ISO8859-1 \ 6499257Sru de_CH.ISO8859-15 de_DE.ISO8859-15 6599257SruNLSLINKS_it_IT.ISO8859-1= it_CH.ISO8859-1 it_CH.ISO8859-15 it_IT.ISO8859-15 6699257SruNLSLINKS_es_ES.ISO8859-1= es_ES.ISO8859-15 6799257Sru 6899257SruNLSNAME= tcsh 6999257Sru 7099257Sru.for catalog in ${CATALOGS} 7199257SruNLS+= ${catalog:C/.*://} 7299257SruNLSSRCDIR_${catalog:C/.*://}= ${TCSHDIR}/nls/${catalog:C/:.*//} 7399257SruNLSSRCFILES_${catalog:C/.*://}!= cd ${NLSSRCDIR_${catalog:C/.*://}}; echo set[0-9]* 7499257Sru.endfor 7599257Sru 7659355Sobriencsh.1: tcsh.man 7759355Sobrien ln -sf ${.ALLSRC} ${.TARGET} 781556Srgrimes 7969551Sachebuild-tools: gethost 8069551Sache 8169415Sachegethost: gethost.c sh.err.h tc.const.h sh.h 8269415Sache @rm -f ${.TARGET} 8369415Sache ${CC} -o gethost ${LDFLAGS} ${CFLAGS} ${TCSHDIR}/gethost.c 8469415Sache 8569415Sachetc.defs.c: gethost ${.CURDIR}/host.defs 8669415Sache @rm -f ${.TARGET} 8769415Sache @echo "/* Do not edit this file, make creates it */" > ${.TARGET} 8869415Sache ./gethost ${.CURDIR}/host.defs >> ${.TARGET} 8969415Sache 9059355Sobriened.defns.h: ed.defns.c 9127965Ssteve @rm -f ${.TARGET} 9227965Ssteve @echo '/* Do not edit this file, make creates it. */' > ${.TARGET} 9359355Sobrien @echo '#ifndef _h_ed_defns' >> ${.TARGET} 9459355Sobrien @echo '#define _h_ed_defns' >> ${.TARGET} 9559355Sobrien grep '[FV]_' ${TCSHDIR}/ed.defns.c | grep '^#define' >> ${.TARGET} 9659355Sobrien @echo '#endif /* _h_ed_defns */' >> ${.TARGET} 9759355Sobrien 9859355Sobriensh.err.h: sh.err.c 9959355Sobrien @rm -f ${.TARGET} 10059355Sobrien @echo '/* Do not edit this file, make creates it. */' > ${.TARGET} 10159355Sobrien @echo '#ifndef _h_sh_err' >> ${.TARGET} 10259355Sobrien @echo '#define _h_sh_err' >> ${.TARGET} 10369415Sache grep 'ERR_' ${.ALLSRC} | grep '^#define' >> ${.TARGET} 10459355Sobrien @echo '#endif /* _h_sh_err */' >> ${.TARGET} 1051556Srgrimes 10659355Sobrientc.const.h: tc.const.c sh.char.h config.h config_f.h sh.types.h sh.err.h 10727969Ssteve @rm -f ${.TARGET} 10827969Ssteve @echo '/* Do not edit this file, make creates it. */' > ${.TARGET} 10959355Sobrien @echo '#ifndef _h_tc_const' >> ${.TARGET} 11059355Sobrien @echo '#define _h_tc_const' >> ${.TARGET} 11169415Sache ${CC} -E ${CFLAGS} ${.ALLSRC} -D_h_tc_const | grep 'Char STR' | \ 1121556Srgrimes sed -e 's/Char \([a-zA-Z0-9_]*\)\(.*\)/extern Char \1[];/' | \ 11327969Ssteve sort >> ${.TARGET} 11459355Sobrien @echo '#endif /* _h_tc_const */' >> ${.TARGET} 1151556Srgrimes 1161556Srgrimes.include <bsd.prog.mk> 117