Makefile revision 155835
150471Speter# $FreeBSD: head/bin/csh/Makefile 155835 2006-02-19 06:40:29Z ume $ 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 13117036Sgordon.if defined(RESCUE) 14117036SgordonDFLAGS= -D_PATH_TCSHELL='"/rescue/${PROG}"' 15117036Sgordon.else 1669551SacheDFLAGS= -D_PATH_TCSHELL='"/bin/${PROG}"' 17117036Sgordon.endif 1869640SobrienCFLAGS+= -I. -I${.CURDIR} -I${TCSHDIR} ${DFLAGS} 19126173SjohanWARNS?= 0 2059355SobrienSRCS= sh.c sh.dir.c sh.dol.c sh.err.c sh.exec.c sh.char.c \ 2159355Sobrien sh.exp.c sh.file.c sh.func.c sh.glob.c sh.hist.c sh.init.c \ 2259355Sobrien sh.lex.c sh.misc.c sh.parse.c sh.print.c sh.proc.c sh.sem.c \ 2369415Sache sh.set.c sh.time.c sh.char.h sh.dir.h sh.proc.h sh.h 2459355SobrienSRCS+= sh.decls.h glob.c glob.h mi.termios.c mi.wait.h mi.varargs.h 2559355SobrienSRCS+= tw.decls.h tw.h tw.help.c tw.init.c tw.parse.c tw.spell.c \ 2659355Sobrien tw.comp.c tw.color.c 2759355SobrienSRCS+= ed.chared.c ed.decls.h ed.defns.c ed.h ed.init.c ed.inputl.c \ 2859355Sobrien ed.refresh.c ed.screen.c ed.xmap.c ed.term.c ed.term.h 2959355SobrienSRCS+= tc.alloc.c tc.bind.c tc.const.c tc.decls.h tc.disc.c \ 30145481Smp tc.func.c tc.nls.c tc.os.c tc.os.h tc.printf.c tc.prompt.c \ 3159355Sobrien tc.sched.c tc.sig.c tc.sig.h tc.str.c sh.types.h tc.vers.c tc.wait.h \ 3259355Sobrien tc.who.c tc.h 3369415SacheGENHDRS= ed.defns.h sh.err.h tc.const.h tc.defs.c 3460599SbdeSRCS+= ${GENHDRS} 351556Srgrimes 3660029SjkoshyMLINKS= csh.1 tcsh.1 3751090Ssheldonh# MLINKS for Shell built in commands for which there are no userland 3851090Ssheldonh# utilities of the same name are handled with the associated manpage, 3951090Ssheldonh# builtin.1 in share/man/man1/. 4051090Ssheldonh 4162759SacheDPADD= ${LIBTERMCAP} ${LIBCRYPT} 4262759SacheLDADD= -ltermcap -lcrypt 431556Srgrimes 4459393SobrienLINKS= ${BINDIR}/csh ${BINDIR}/tcsh 4559393Sobrien 4669415SacheCLEANFILES= ${GENHDRS} gethost csh.1 4760599Sbde 48148673Sphk.if !defined(NO_EXAMPLES) 4990559SmpFILESDIR= ${SHAREDIR}/examples/tcsh 5090559SmpFILES= complete.tcsh csh-mode.el 51148673Sphk.endif 5290559Smp 5399257SruCATALOGS= et:et_EE.ISO8859-15 \ 5499257Sru finnish:fi_FI.ISO8859-1 \ 5599257Sru french:fr_FR.ISO8859-1 \ 5699257Sru german:de_DE.ISO8859-1 \ 5799257Sru greek:el_GR.ISO8859-7 \ 5899257Sru italian:it_IT.ISO8859-1 \ 5999257Sru ja:ja_JP.eucJP \ 6099257Sru russian:ru_RU.KOI8-R \ 6199257Sru spanish:es_ES.ISO8859-1 \ 6299257Sru ukrainian:uk_UA.KOI8-U 6399257Sru 6499257SruNLSLINKS_fi_FI.ISO8859-1= fi_FI.ISO8859-15 6599257SruNLSLINKS_fr_FR.ISO8859-1= fr_BE.ISO8859-1 fr_BE.ISO8859-15 \ 6699257Sru fr_CA.ISO8859-1 fr_CA.ISO8859-15 fr_CH.ISO8859-1 \ 6799257Sru fr_CH.ISO8859-15 fr_FR.ISO8859-15 6899257SruNLSLINKS_de_DE.ISO8859-1= de_AT.ISO8859-1 de_AT.ISO8859-15 de_CH.ISO8859-1 \ 6999257Sru de_CH.ISO8859-15 de_DE.ISO8859-15 7099257SruNLSLINKS_it_IT.ISO8859-1= it_CH.ISO8859-1 it_CH.ISO8859-15 it_IT.ISO8859-15 7199257SruNLSLINKS_es_ES.ISO8859-1= es_ES.ISO8859-15 7299257Sru 73155835Sume.if defined(NO_NLS_CATALOGS) || defined(RESCUE) 74155835SumeCFLAGS+= -DNO_NLS_CATALOGS 75155835Sume.else 76155835SumeCFLAGS+= -DHAVE_ICONV 77155835SumeSRCS+= iconv_stub.c 78155835Sume# Folloing links can be installed from ports/shells/tcsh_nls: 79155835Sume# NLSLINKS_de_DE.ISO8859-1 += de_AT.UTF-8 de_CH.UTF-8 de_DE.UTF-8 80155835Sume# NLSLINKS_el_GR.ISO8859-7 = el_GR.UTF-8 81155835Sume# NLSLINKS_es_ES.ISO8859-1 += es_ES.UTF-8 82155835Sume# NLSLINKS_et_EE.ISO8859-15 = et_EE.UTF-8 83155835Sume# NLSLINKS_fi_FI.ISO8859-1 += fi_FI.UTF-8 84155835Sume# NLSLINKS_fr_FR.ISO8859-1 += fr_BE.UTF-8 fr_CA.UTF-8 fr_CH.UTF-8 fr_FR.UTF-8 85155835Sume# NLSLINKS_it_IT.ISO8859-1 += it_CH.UTF-8 it_IT.UTF-8 86155835Sume# NLSLINKS_ja_JP.eucJP = ja_JP.SJIS ja_JP.UTF-8 87155835Sume# NLSLINKS_ru_RU.KOI8-R = ru_RU.CP1251 ru_RU.CP866 ru_RU.ISO8859-5 ru_RU.UTF-8 88155835Sume# NLSLINKS_uk_UA.KOI8-U = uk_UA.ISO8859-5 uk_UA.UTF-8 89155835Sume.endif 90155835Sume 9199257SruNLSNAME= tcsh 9299257Sru 9399257Sru.for catalog in ${CATALOGS} 9499257SruNLS+= ${catalog:C/.*://} 9599257SruNLSSRCDIR_${catalog:C/.*://}= ${TCSHDIR}/nls/${catalog:C/:.*//} 96155835SumeNLSSRCFILES_${catalog:C/.*://}!= cd ${NLSSRCDIR_${catalog:C/.*://}}; echo charset set[0-9]* 9799257Sru.endfor 9899257Sru 9959355Sobriencsh.1: tcsh.man 100115898Skuriyama cat ${.ALLSRC} > ${.TARGET} 1011556Srgrimes 10269551Sachebuild-tools: gethost 10369551Sache 10469415Sachegethost: gethost.c sh.err.h tc.const.h sh.h 10569415Sache @rm -f ${.TARGET} 10669415Sache ${CC} -o gethost ${LDFLAGS} ${CFLAGS} ${TCSHDIR}/gethost.c 10769415Sache 10869415Sachetc.defs.c: gethost ${.CURDIR}/host.defs 10969415Sache @rm -f ${.TARGET} 11069415Sache @echo "/* Do not edit this file, make creates it */" > ${.TARGET} 11169415Sache ./gethost ${.CURDIR}/host.defs >> ${.TARGET} 11269415Sache 11359355Sobriened.defns.h: ed.defns.c 11427965Ssteve @rm -f ${.TARGET} 11527965Ssteve @echo '/* Do not edit this file, make creates it. */' > ${.TARGET} 11659355Sobrien @echo '#ifndef _h_ed_defns' >> ${.TARGET} 11759355Sobrien @echo '#define _h_ed_defns' >> ${.TARGET} 11859355Sobrien grep '[FV]_' ${TCSHDIR}/ed.defns.c | grep '^#define' >> ${.TARGET} 11959355Sobrien @echo '#endif /* _h_ed_defns */' >> ${.TARGET} 12059355Sobrien 12159355Sobriensh.err.h: sh.err.c 12259355Sobrien @rm -f ${.TARGET} 12359355Sobrien @echo '/* Do not edit this file, make creates it. */' > ${.TARGET} 12459355Sobrien @echo '#ifndef _h_sh_err' >> ${.TARGET} 12559355Sobrien @echo '#define _h_sh_err' >> ${.TARGET} 12669415Sache grep 'ERR_' ${.ALLSRC} | grep '^#define' >> ${.TARGET} 12759355Sobrien @echo '#endif /* _h_sh_err */' >> ${.TARGET} 1281556Srgrimes 12959355Sobrientc.const.h: tc.const.c sh.char.h config.h config_f.h sh.types.h sh.err.h 13027969Ssteve @rm -f ${.TARGET} 13127969Ssteve @echo '/* Do not edit this file, make creates it. */' > ${.TARGET} 13259355Sobrien @echo '#ifndef _h_tc_const' >> ${.TARGET} 13359355Sobrien @echo '#define _h_tc_const' >> ${.TARGET} 13469415Sache ${CC} -E ${CFLAGS} ${.ALLSRC} -D_h_tc_const | grep 'Char STR' | \ 1351556Srgrimes sed -e 's/Char \([a-zA-Z0-9_]*\)\(.*\)/extern Char \1[];/' | \ 13627969Ssteve sort >> ${.TARGET} 13759355Sobrien @echo '#endif /* _h_tc_const */' >> ${.TARGET} 1381556Srgrimes 1391556Srgrimes.include <bsd.prog.mk> 140