Makefile revision 156813
167754Smsmith# $FreeBSD: head/bin/csh/Makefile 156813 2006-03-17 18:54:44Z ru $ 267754Smsmith# @(#)Makefile 8.1 (Berkeley) 5/31/93 367754Smsmith# 467754Smsmith# C Shell with process control; VM/UNIX VAX Makefile 573561Smsmith# Bill Joy UC Berkeley; Jim Kulp IIASA, Austria 667754Smsmith# 767754Smsmith# To profile, put -DPROF in DEFS and -pg in CFLAGS, and recompile. 867754Smsmith 967754Smsmith.include <bsd.own.mk> 1067754Smsmith 1167754SmsmithTCSHDIR= ${.CURDIR}/../../contrib/tcsh 1267754Smsmith.PATH: ${TCSHDIR} 1371867Smsmith 1470243SmsmithPROG= csh 1567754Smsmith.if defined(RESCUE) 1667754SmsmithDFLAGS= -D_PATH_TCSHELL='"/rescue/${PROG}"' 1767754Smsmith.else 1867754SmsmithDFLAGS= -D_PATH_TCSHELL='"/bin/${PROG}"' 1967754Smsmith.endif 2067754SmsmithCFLAGS+= -I. -I${.CURDIR} -I${TCSHDIR} ${DFLAGS} 2167754SmsmithWARNS?= 0 2267754SmsmithSRCS= sh.c sh.dir.c sh.dol.c sh.err.c sh.exec.c sh.char.c \ 2367754Smsmith sh.exp.c sh.file.c sh.func.c sh.glob.c sh.hist.c sh.init.c \ 2467754Smsmith sh.lex.c sh.misc.c sh.parse.c sh.print.c sh.proc.c sh.sem.c \ 2567754Smsmith sh.set.c sh.time.c sh.char.h sh.dir.h sh.proc.h sh.h 2667754SmsmithSRCS+= sh.decls.h glob.c glob.h mi.termios.c mi.wait.h mi.varargs.h 2767754SmsmithSRCS+= tw.decls.h tw.h tw.help.c tw.init.c tw.parse.c tw.spell.c \ 2867754Smsmith tw.comp.c tw.color.c 2967754SmsmithSRCS+= ed.chared.c ed.decls.h ed.defns.c ed.h ed.init.c ed.inputl.c \ 3067754Smsmith ed.refresh.c ed.screen.c ed.xmap.c ed.term.c ed.term.h 3167754SmsmithSRCS+= tc.alloc.c tc.bind.c tc.const.c tc.decls.h tc.disc.c \ 3267754Smsmith tc.func.c tc.nls.c tc.os.c tc.os.h tc.printf.c tc.prompt.c \ 3367754Smsmith tc.sched.c tc.sig.c tc.sig.h tc.str.c sh.types.h tc.vers.c tc.wait.h \ 3467754Smsmith tc.who.c tc.h 3567754SmsmithGENHDRS= ed.defns.h sh.err.h tc.const.h tc.defs.c 3667754SmsmithSRCS+= ${GENHDRS} 3767754Smsmith 3867754SmsmithMLINKS= csh.1 tcsh.1 3967754Smsmith# MLINKS for Shell built in commands for which there are no userland 4067754Smsmith# utilities of the same name are handled with the associated manpage, 4167754Smsmith# builtin.1 in share/man/man1/. 4267754Smsmith 4367754SmsmithDPADD= ${LIBTERMCAP} ${LIBCRYPT} 4467754SmsmithLDADD= -ltermcap -lcrypt 4567754Smsmith 4667754SmsmithLINKS= ${BINDIR}/csh ${BINDIR}/tcsh 4767754Smsmith 4867754SmsmithCLEANFILES= ${GENHDRS} gethost csh.1 4967754Smsmith 5067754Smsmith.if ${MK_EXAMPLES} != "no" 5167754SmsmithFILESDIR= ${SHAREDIR}/examples/tcsh 5267754SmsmithFILES= complete.tcsh csh-mode.el 5367754Smsmith.endif 5467754Smsmith 5567754SmsmithCATALOGS= et:et_EE.ISO8859-15 \ 5667754Smsmith finnish:fi_FI.ISO8859-1 \ 5767754Smsmith french:fr_FR.ISO8859-1 \ 5867754Smsmith german:de_DE.ISO8859-1 \ 5967754Smsmith greek:el_GR.ISO8859-7 \ 6067754Smsmith italian:it_IT.ISO8859-1 \ 6167754Smsmith ja:ja_JP.eucJP \ 6267754Smsmith russian:ru_RU.KOI8-R \ 6367754Smsmith spanish:es_ES.ISO8859-1 \ 6467754Smsmith ukrainian:uk_UA.KOI8-U 6567754Smsmith 6667754SmsmithNLSLINKS_fi_FI.ISO8859-1= fi_FI.ISO8859-15 6767754SmsmithNLSLINKS_fr_FR.ISO8859-1= fr_BE.ISO8859-1 fr_BE.ISO8859-15 \ 6867754Smsmith fr_CA.ISO8859-1 fr_CA.ISO8859-15 fr_CH.ISO8859-1 \ 6967754Smsmith fr_CH.ISO8859-15 fr_FR.ISO8859-15 7067754SmsmithNLSLINKS_de_DE.ISO8859-1= de_AT.ISO8859-1 de_AT.ISO8859-15 de_CH.ISO8859-1 \ 7167754Smsmith de_CH.ISO8859-15 de_DE.ISO8859-15 7267754SmsmithNLSLINKS_it_IT.ISO8859-1= it_CH.ISO8859-1 it_CH.ISO8859-15 it_IT.ISO8859-15 7367754SmsmithNLSLINKS_es_ES.ISO8859-1= es_ES.ISO8859-15 7467754Smsmith 7567754Smsmith.if ${MK_NLS_CATALOGS} == "no" || defined(RESCUE) 7667754SmsmithCFLAGS+= -DNO_NLS_CATALOGS 7767754Smsmith.else 7867754SmsmithCFLAGS+= -DHAVE_ICONV 7967754SmsmithSRCS+= iconv_stub.c 8067754Smsmith# Folloing links can be installed from ports/shells/tcsh_nls: 8167754Smsmith# NLSLINKS_de_DE.ISO8859-1 += de_AT.UTF-8 de_CH.UTF-8 de_DE.UTF-8 8267754Smsmith# NLSLINKS_el_GR.ISO8859-7 = el_GR.UTF-8 8367754Smsmith# NLSLINKS_es_ES.ISO8859-1 += es_ES.UTF-8 8467754Smsmith# NLSLINKS_et_EE.ISO8859-15 = et_EE.UTF-8 8567754Smsmith# NLSLINKS_fi_FI.ISO8859-1 += fi_FI.UTF-8 8667754Smsmith# NLSLINKS_fr_FR.ISO8859-1 += fr_BE.UTF-8 fr_CA.UTF-8 fr_CH.UTF-8 fr_FR.UTF-8 8767754Smsmith# NLSLINKS_it_IT.ISO8859-1 += it_CH.UTF-8 it_IT.UTF-8 8867754Smsmith# NLSLINKS_ja_JP.eucJP = ja_JP.SJIS ja_JP.UTF-8 8967754Smsmith# NLSLINKS_ru_RU.KOI8-R = ru_RU.CP1251 ru_RU.CP866 ru_RU.ISO8859-5 ru_RU.UTF-8 9067754Smsmith# NLSLINKS_uk_UA.KOI8-U = uk_UA.ISO8859-5 uk_UA.UTF-8 9167754Smsmith.endif 9267754Smsmith 9367754SmsmithNLSNAME= tcsh 9467754Smsmith 9567754Smsmith.for catalog in ${CATALOGS} 9667754SmsmithNLS+= ${catalog:C/.*://} 9767754SmsmithNLSSRCDIR_${catalog:C/.*://}= ${TCSHDIR}/nls/${catalog:C/:.*//} 9867754SmsmithNLSSRCFILES_${catalog:C/.*://}!= cd ${NLSSRCDIR_${catalog:C/.*://}}; echo charset set[0-9]* 9967754Smsmith.endfor 10067754Smsmith 10167754Smsmithcsh.1: tcsh.man 10267754Smsmith cat ${.ALLSRC} > ${.TARGET} 10367754Smsmith 10467754Smsmithbuild-tools: gethost 10567754Smsmith 10667754Smsmithgethost: gethost.c sh.err.h tc.const.h sh.h 10767754Smsmith @rm -f ${.TARGET} 10867754Smsmith ${CC} -o gethost ${LDFLAGS} ${CFLAGS} ${TCSHDIR}/gethost.c 10967754Smsmith 11067754Smsmithtc.defs.c: gethost ${.CURDIR}/host.defs 11167754Smsmith @rm -f ${.TARGET} 11267754Smsmith @echo "/* Do not edit this file, make creates it */" > ${.TARGET} 11367754Smsmith ./gethost ${.CURDIR}/host.defs >> ${.TARGET} 11467754Smsmith 11567754Smsmithed.defns.h: ed.defns.c 11667754Smsmith @rm -f ${.TARGET} 11767754Smsmith @echo '/* Do not edit this file, make creates it. */' > ${.TARGET} 11867754Smsmith @echo '#ifndef _h_ed_defns' >> ${.TARGET} 11967754Smsmith @echo '#define _h_ed_defns' >> ${.TARGET} 12067754Smsmith grep '[FV]_' ${TCSHDIR}/ed.defns.c | grep '^#define' >> ${.TARGET} 12169450Smsmith @echo '#endif /* _h_ed_defns */' >> ${.TARGET} 12273561Smsmith 12373561Smsmithsh.err.h: sh.err.c 12467754Smsmith @rm -f ${.TARGET} 12567754Smsmith @echo '/* Do not edit this file, make creates it. */' > ${.TARGET} 12667754Smsmith @echo '#ifndef _h_sh_err' >> ${.TARGET} 12767754Smsmith @echo '#define _h_sh_err' >> ${.TARGET} 12867754Smsmith grep 'ERR_' ${.ALLSRC} | grep '^#define' >> ${.TARGET} 12967754Smsmith @echo '#endif /* _h_sh_err */' >> ${.TARGET} 13067754Smsmith 13167754Smsmithtc.const.h: tc.const.c sh.char.h config.h config_f.h sh.types.h sh.err.h 13267754Smsmith @rm -f ${.TARGET} 13367754Smsmith @echo '/* Do not edit this file, make creates it. */' > ${.TARGET} 13467754Smsmith @echo '#ifndef _h_tc_const' >> ${.TARGET} 13567754Smsmith @echo '#define _h_tc_const' >> ${.TARGET} 13667754Smsmith ${CC} -E ${CFLAGS} ${.ALLSRC} -D_h_tc_const | grep 'Char STR' | \ 13767754Smsmith sed -e 's/Char \([a-zA-Z0-9_]*\)\(.*\)/extern Char \1[];/' | \ 13867754Smsmith sort >> ${.TARGET} 13967754Smsmith @echo '#endif /* _h_tc_const */' >> ${.TARGET} 14067754Smsmith 14167754Smsmith.include <bsd.prog.mk> 14267754Smsmith