1# $FreeBSD: src/bin/csh/Makefile,v 1.11.2.8 2002/02/19 00:36:40 mp Exp $ 2# $DragonFly: src/bin/csh/Makefile,v 1.8 2008/01/15 13:54:43 matthias Exp $ 3# @(#)Makefile 8.1 (Berkeley) 5/31/93 4# 5# C Shell with process control; VM/UNIX VAX Makefile 6# Bill Joy UC Berkeley; Jim Kulp IIASA, Austria 7# 8# To profile, put -DPROF in DEFS and -pg in CFLAGS, and recompile. 9 10WARNS?= 2 11 12TCSHDIR= ${.CURDIR}/../../contrib/tcsh-6 13CONTRIBDIR=${TCSHDIR} 14.PATH: ${TCSHDIR} 15 16PROG= csh 17DFLAGS= -D_PATH_TCSHELL='"/bin/${PROG}"' 18CFLAGS+= -I. -I${.CURDIR} -I${TCSHDIR} ${DFLAGS} 19SRCS= sh.c sh.dir.c sh.dol.c sh.err.c sh.exec.c sh.char.c \ 20 sh.exp.c sh.file.c sh.func.c sh.glob.c sh.hist.c sh.init.c \ 21 sh.lex.c sh.misc.c sh.parse.c sh.print.c sh.proc.c sh.sem.c \ 22 sh.set.c sh.time.c sh.char.h sh.dir.h sh.proc.h sh.h 23SRCS+= sh.decls.h glob.c glob.h mi.termios.c 24SRCS+= tw.decls.h tw.h tw.help.c tw.init.c tw.parse.c tw.spell.c \ 25 tw.comp.c tw.color.c 26SRCS+= ed.chared.c ed.decls.h ed.defns.c ed.h ed.init.c ed.inputl.c \ 27 ed.refresh.c ed.screen.c ed.xmap.c ed.term.c ed.term.h 28SRCS+= tc.alloc.c tc.bind.c tc.const.c tc.decls.h tc.disc.c \ 29 tc.func.c tc.nls.c tc.os.c tc.os.h tc.printf.c tc.prompt.c \ 30 tc.sched.c tc.sig.c tc.sig.h tc.str.c sh.types.h tc.vers.c tc.wait.h \ 31 tc.who.c tc.h 32GENHDRS= ed.defns.h sh.err.h tc.const.h tc.defs.c 33SRCS+= ${GENHDRS} 34 35MLINKS= csh.1 tcsh.1 36# MLINKS for Shell built in commands for which there are no userland 37# utilities of the same name are handled with the associated manpage, 38# builtin.1 in share/man/man1/. 39 40DPADD= ${LIBTERMCAP} ${LIBCRYPT} 41LDADD= -ltermcap -lcrypt 42 43LINKS= ${BINDIR}/csh ${BINDIR}/tcsh 44 45CLEANFILES= ${GENHDRS} gethost.nx csh.1 46 47FILESDIR= ${SHAREDIR}/examples/tcsh 48FILES= complete.tcsh 49 50CATALOGS= et:et_EE.ISO8859-15 \ 51 finnish:fi_FI.ISO8859-1 \ 52 french:fr_FR.ISO8859-1 \ 53 german:de_DE.ISO8859-1 \ 54 greek:el_GR.ISO8859-7 \ 55 italian:it_IT.ISO8859-1 \ 56 ja:ja_JP.eucJP \ 57 russian:ru_RU.KOI8-R \ 58 spanish:es_ES.ISO8859-1 \ 59 ukrainian:uk_UA.KOI8-U 60 61NLSLINKS_fi_FI.ISO8859-1= fi_FI.ISO8859-15 62NLSLINKS_fr_FR.ISO8859-1= fr_BE.ISO8859-1 fr_BE.ISO8859-15 \ 63 fr_CA.ISO8859-1 fr_CA.ISO8859-15 fr_CH.ISO8859-1 \ 64 fr_CH.ISO8859-15 fr_FR.ISO8859-15 65NLSLINKS_de_DE.ISO8859-1= de_AT.ISO8859-1 de_AT.ISO8859-15 de_CH.ISO8859-1 \ 66 de_CH.ISO8859-15 de_DE.ISO8859-15 67NLSLINKS_it_IT.ISO8859-1= it_CH.ISO8859-1 it_CH.ISO8859-15 it_IT.ISO8859-15 68NLSLINKS_es_ES.ISO8859-1= es_ES.ISO8859-15 69 70NLSNAME= tcsh 71 72.for catalog in ${CATALOGS} 73NLS+= ${catalog:C/.*://} 74NLSSRCDIR_${catalog:C/.*://}= ${TCSHDIR}/nls/${catalog:C/:.*//} 75NLSSRCFILES_${catalog:C/.*://}!= cd ${NLSSRCDIR_${catalog:C/.*://}}; echo set[0-9]* 76.endfor 77 78csh.1: tcsh.man 79 ${LN} -sf ${.ALLSRC} ${.TARGET} 80 81build-tools: gethost.nx 82 83gethost.nx: gethost.c sh.err.h tc.const.h sh.h 84 85tc.defs.c: gethost.nx ${.CURDIR}/host.defs 86 @rm -f ${.TARGET} 87 @echo "/* Do not edit this file, make creates it */" > ${.TARGET} 88 ./gethost.nx ${.CURDIR}/host.defs >> ${.TARGET} 89 90ed.defns.h: ed.defns.c 91 @rm -f ${.TARGET} 92 @echo '/* Do not edit this file, make creates it. */' > ${.TARGET} 93 @echo '#ifndef _h_ed_defns' >> ${.TARGET} 94 @echo '#define _h_ed_defns' >> ${.TARGET} 95 grep '[FV]_' ${TCSHDIR}/ed.defns.c | grep '^#define' >> ${.TARGET} 96 @echo '#endif /* _h_ed_defns */' >> ${.TARGET} 97 98sh.err.h: sh.err.c 99 @rm -f ${.TARGET} 100 @echo '/* Do not edit this file, make creates it. */' > ${.TARGET} 101 @echo '#ifndef _h_sh_err' >> ${.TARGET} 102 @echo '#define _h_sh_err' >> ${.TARGET} 103 grep 'ERR_' ${.ALLSRC} | grep '^#define' >> ${.TARGET} 104 @echo '#endif /* _h_sh_err */' >> ${.TARGET} 105 106tc.const.h: tc.const.c sh.char.h config.h config_f.h sh.types.h sh.err.h 107 @rm -f ${.TARGET} 108 @echo '/* Do not edit this file, make creates it. */' > ${.TARGET} 109 @echo '#ifndef _h_tc_const' >> ${.TARGET} 110 @echo '#define _h_tc_const' >> ${.TARGET} 111 ${CC} -E ${CFLAGS} ${.ALLSRC} -D_h_tc_const | grep 'Char STR' | \ 112 sed -e 's/Char \([a-zA-Z0-9_]*\)\(.*\)/extern Char \1[];/' | \ 113 sort >> ${.TARGET} 114 @echo '#endif /* _h_tc_const */' >> ${.TARGET} 115 116.include <bsd.prog.mk> 117