Makefile revision 117036
150471Speter# $FreeBSD: head/bin/csh/Makefile 117036 2003-06-29 18:46:18Z gordon $ 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} 19116282SmarkmWARNS= 2 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 \ 3059355Sobrien tc.func.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 4890559SmpFILESDIR= ${SHAREDIR}/examples/tcsh 4990559SmpFILES= complete.tcsh csh-mode.el 5090559Smp 5199257SruCATALOGS= et:et_EE.ISO8859-15 \ 5299257Sru finnish:fi_FI.ISO8859-1 \ 5399257Sru french:fr_FR.ISO8859-1 \ 5499257Sru german:de_DE.ISO8859-1 \ 5599257Sru greek:el_GR.ISO8859-7 \ 5699257Sru italian:it_IT.ISO8859-1 \ 5799257Sru ja:ja_JP.eucJP \ 5899257Sru russian:ru_RU.KOI8-R \ 5999257Sru spanish:es_ES.ISO8859-1 \ 6099257Sru ukrainian:uk_UA.KOI8-U 6199257Sru 6299257SruNLSLINKS_fi_FI.ISO8859-1= fi_FI.ISO8859-15 6399257SruNLSLINKS_fr_FR.ISO8859-1= fr_BE.ISO8859-1 fr_BE.ISO8859-15 \ 6499257Sru fr_CA.ISO8859-1 fr_CA.ISO8859-15 fr_CH.ISO8859-1 \ 6599257Sru fr_CH.ISO8859-15 fr_FR.ISO8859-15 6699257SruNLSLINKS_de_DE.ISO8859-1= de_AT.ISO8859-1 de_AT.ISO8859-15 de_CH.ISO8859-1 \ 6799257Sru de_CH.ISO8859-15 de_DE.ISO8859-15 6899257SruNLSLINKS_it_IT.ISO8859-1= it_CH.ISO8859-1 it_CH.ISO8859-15 it_IT.ISO8859-15 6999257SruNLSLINKS_es_ES.ISO8859-1= es_ES.ISO8859-15 7099257Sru 7199257SruNLSNAME= tcsh 7299257Sru 7399257Sru.for catalog in ${CATALOGS} 7499257SruNLS+= ${catalog:C/.*://} 7599257SruNLSSRCDIR_${catalog:C/.*://}= ${TCSHDIR}/nls/${catalog:C/:.*//} 7699257SruNLSSRCFILES_${catalog:C/.*://}!= cd ${NLSSRCDIR_${catalog:C/.*://}}; echo set[0-9]* 7799257Sru.endfor 7899257Sru 7959355Sobriencsh.1: tcsh.man 80115898Skuriyama cat ${.ALLSRC} > ${.TARGET} 811556Srgrimes 8269551Sachebuild-tools: gethost 8369551Sache 8469415Sachegethost: gethost.c sh.err.h tc.const.h sh.h 8569415Sache @rm -f ${.TARGET} 8669415Sache ${CC} -o gethost ${LDFLAGS} ${CFLAGS} ${TCSHDIR}/gethost.c 8769415Sache 8869415Sachetc.defs.c: gethost ${.CURDIR}/host.defs 8969415Sache @rm -f ${.TARGET} 9069415Sache @echo "/* Do not edit this file, make creates it */" > ${.TARGET} 9169415Sache ./gethost ${.CURDIR}/host.defs >> ${.TARGET} 9269415Sache 9359355Sobriened.defns.h: ed.defns.c 9427965Ssteve @rm -f ${.TARGET} 9527965Ssteve @echo '/* Do not edit this file, make creates it. */' > ${.TARGET} 9659355Sobrien @echo '#ifndef _h_ed_defns' >> ${.TARGET} 9759355Sobrien @echo '#define _h_ed_defns' >> ${.TARGET} 9859355Sobrien grep '[FV]_' ${TCSHDIR}/ed.defns.c | grep '^#define' >> ${.TARGET} 9959355Sobrien @echo '#endif /* _h_ed_defns */' >> ${.TARGET} 10059355Sobrien 10159355Sobriensh.err.h: sh.err.c 10259355Sobrien @rm -f ${.TARGET} 10359355Sobrien @echo '/* Do not edit this file, make creates it. */' > ${.TARGET} 10459355Sobrien @echo '#ifndef _h_sh_err' >> ${.TARGET} 10559355Sobrien @echo '#define _h_sh_err' >> ${.TARGET} 10669415Sache grep 'ERR_' ${.ALLSRC} | grep '^#define' >> ${.TARGET} 10759355Sobrien @echo '#endif /* _h_sh_err */' >> ${.TARGET} 1081556Srgrimes 10959355Sobrientc.const.h: tc.const.c sh.char.h config.h config_f.h sh.types.h sh.err.h 11027969Ssteve @rm -f ${.TARGET} 11127969Ssteve @echo '/* Do not edit this file, make creates it. */' > ${.TARGET} 11259355Sobrien @echo '#ifndef _h_tc_const' >> ${.TARGET} 11359355Sobrien @echo '#define _h_tc_const' >> ${.TARGET} 11469415Sache ${CC} -E ${CFLAGS} ${.ALLSRC} -D_h_tc_const | grep 'Char STR' | \ 1151556Srgrimes sed -e 's/Char \([a-zA-Z0-9_]*\)\(.*\)/extern Char \1[];/' | \ 11627969Ssteve sort >> ${.TARGET} 11759355Sobrien @echo '#endif /* _h_tc_const */' >> ${.TARGET} 1181556Srgrimes 1191556Srgrimes.include <bsd.prog.mk> 120