1999-08-27 23:15:48 +00:00
|
|
|
# $FreeBSD$
|
1994-05-26 06:18:55 +00:00
|
|
|
# @(#)Makefile 8.1 (Berkeley) 5/31/93
|
|
|
|
#
|
|
|
|
# C Shell with process control; VM/UNIX VAX Makefile
|
|
|
|
# Bill Joy UC Berkeley; Jim Kulp IIASA, Austria
|
|
|
|
#
|
|
|
|
# To profile, put -DPROF in DEFS and -pg in CFLAGS, and recompile.
|
|
|
|
|
2014-05-06 04:22:01 +00:00
|
|
|
.include <src.opts.mk>
|
2006-03-17 18:54:44 +00:00
|
|
|
|
2000-04-23 18:08:49 +00:00
|
|
|
TCSHDIR= ${.CURDIR}/../../contrib/tcsh
|
2000-04-18 07:31:36 +00:00
|
|
|
.PATH: ${TCSHDIR}
|
|
|
|
|
1994-05-26 06:18:55 +00:00
|
|
|
PROG= csh
|
2003-06-29 18:46:18 +00:00
|
|
|
.if defined(RESCUE)
|
|
|
|
DFLAGS= -D_PATH_TCSHELL='"/rescue/${PROG}"'
|
|
|
|
.else
|
2000-12-03 16:28:56 +00:00
|
|
|
DFLAGS= -D_PATH_TCSHELL='"/bin/${PROG}"'
|
2003-06-29 18:46:18 +00:00
|
|
|
.endif
|
2000-12-05 22:10:43 +00:00
|
|
|
CFLAGS+= -I. -I${.CURDIR} -I${TCSHDIR} ${DFLAGS}
|
2012-02-22 03:36:15 +00:00
|
|
|
WARNS?= 1
|
2000-04-18 07:31:36 +00:00
|
|
|
SRCS= sh.c sh.dir.c sh.dol.c sh.err.c sh.exec.c sh.char.c \
|
|
|
|
sh.exp.c sh.file.c sh.func.c sh.glob.c sh.hist.c sh.init.c \
|
|
|
|
sh.lex.c sh.misc.c sh.parse.c sh.print.c sh.proc.c sh.sem.c \
|
2000-11-30 21:38:37 +00:00
|
|
|
sh.set.c sh.time.c sh.char.h sh.dir.h sh.proc.h sh.h
|
2000-04-18 07:31:36 +00:00
|
|
|
SRCS+= sh.decls.h glob.c glob.h mi.termios.c mi.wait.h mi.varargs.h
|
|
|
|
SRCS+= tw.decls.h tw.h tw.help.c tw.init.c tw.parse.c tw.spell.c \
|
|
|
|
tw.comp.c tw.color.c
|
|
|
|
SRCS+= ed.chared.c ed.decls.h ed.defns.c ed.h ed.init.c ed.inputl.c \
|
|
|
|
ed.refresh.c ed.screen.c ed.xmap.c ed.term.c ed.term.h
|
|
|
|
SRCS+= tc.alloc.c tc.bind.c tc.const.c tc.decls.h tc.disc.c \
|
2005-04-24 19:44:43 +00:00
|
|
|
tc.func.c tc.nls.c tc.os.c tc.os.h tc.printf.c tc.prompt.c \
|
2000-04-18 07:31:36 +00:00
|
|
|
tc.sched.c tc.sig.c tc.sig.h tc.str.c sh.types.h tc.vers.c tc.wait.h \
|
|
|
|
tc.who.c tc.h
|
2000-11-30 21:38:37 +00:00
|
|
|
GENHDRS= ed.defns.h sh.err.h tc.const.h tc.defs.c
|
2000-05-15 14:24:32 +00:00
|
|
|
SRCS+= ${GENHDRS}
|
1994-05-26 06:18:55 +00:00
|
|
|
|
2000-05-05 08:12:11 +00:00
|
|
|
MLINKS= csh.1 tcsh.1
|
1999-09-08 15:40:46 +00:00
|
|
|
# MLINKS for Shell built in commands for which there are no userland
|
|
|
|
# utilities of the same name are handled with the associated manpage,
|
|
|
|
# builtin.1 in share/man/man1/.
|
|
|
|
|
2014-11-25 11:15:40 +00:00
|
|
|
LIBADD= termcapw crypt
|
2000-04-18 07:31:36 +00:00
|
|
|
|
2000-04-19 15:15:19 +00:00
|
|
|
LINKS= ${BINDIR}/csh ${BINDIR}/tcsh
|
|
|
|
|
2000-11-30 21:38:37 +00:00
|
|
|
CLEANFILES= ${GENHDRS} gethost csh.1
|
2000-05-15 14:24:32 +00:00
|
|
|
|
2006-03-17 18:54:44 +00:00
|
|
|
.if ${MK_EXAMPLES} != "no"
|
2002-02-12 04:50:12 +00:00
|
|
|
FILESDIR= ${SHAREDIR}/examples/tcsh
|
|
|
|
FILES= complete.tcsh csh-mode.el
|
2005-08-03 09:22:03 +00:00
|
|
|
.endif
|
2002-02-12 04:50:12 +00:00
|
|
|
|
2016-02-03 11:44:43 +00:00
|
|
|
CATALOGS= et:et_EE.UTF-8 \
|
|
|
|
finnish:fi_FI.UTF-8 \
|
|
|
|
french:fr_FR.UTF-8 \
|
|
|
|
german:de_DE.UTF-8 \
|
|
|
|
greek:el_GR.UTF-8 \
|
|
|
|
italian:it_IT.UTF-8 \
|
|
|
|
ja:ja_JP.UTF-8 \
|
|
|
|
russian:ru_RU.UTF-8 \
|
|
|
|
spanish:es_ES.UTF-8 \
|
|
|
|
ukrainian:uk_UA.UTF-8
|
|
|
|
|
2016-02-03 23:37:24 +00:00
|
|
|
NLSLINKS_de_DE.UTF-8 = de_AT.UTF-8 de_CH.UTF-8
|
2016-02-03 11:44:43 +00:00
|
|
|
NLSLINKS_fr_FR.UTF-8 = fr_BE.UTF-8 fr_CA.UTF-8 fr_CH.UTF-8
|
|
|
|
NLSLINKS_it_IT.UTF-8 = it_CH.UTF-8
|
2002-07-02 12:37:09 +00:00
|
|
|
|
2006-03-17 18:54:44 +00:00
|
|
|
.if ${MK_NLS_CATALOGS} == "no" || defined(RESCUE)
|
2006-02-19 06:40:29 +00:00
|
|
|
CFLAGS+= -DNO_NLS_CATALOGS
|
|
|
|
.else
|
|
|
|
CFLAGS+= -DHAVE_ICONV
|
2011-02-26 18:54:54 +00:00
|
|
|
.if ${MK_ICONV} != "no"
|
2016-02-03 11:44:43 +00:00
|
|
|
NLSLINKS_de_DE.UTF-8 += de_AT.ISO8859-1 de_AT.ISO8859-15 de_CH.ISO8859-1 \
|
|
|
|
de_CH.ISO8859-15 de_DE.ISO8859-1 de_DE.ISO8859-15
|
|
|
|
NLSLINKS_el_GR.UTF-8 = el_GR.ISO8859-7
|
|
|
|
NLSLINKS_es_ES.UTF-8 = es_ES.ISO8859-1 es_ES.ISO8859-15
|
|
|
|
NLSLINKS_et_EE.UTF-8 = et_EE.ISO8859-15
|
|
|
|
NLSLINKS_fi_FI.UTF-8 = fi_FI.ISO8859-1 fi_FI.ISO8859-15
|
|
|
|
NLSLINKS_fr_FR.UTF-8 += fr_BE.ISO8859-1 fr_BE.ISO8859-15 \
|
|
|
|
fr_CA.ISO8859-1 fr_CA.ISO8859-15 fr_CH.ISO8859-1 \
|
|
|
|
fr_CH.ISO8859-15 fr_FR.ISO8859-1 fr_FR.ISO8859-15
|
|
|
|
NLSLINKS_it_IT.UTF-8 += it_CH.ISO8859-1 it_CH.ISO8859-15 it_IT.ISO8859-1 \
|
|
|
|
it_IT.ISO8859-15
|
|
|
|
NLSLINKS_ja_JP.UTF-8 = ja_JP.SJIS ja_JP.eucJP
|
|
|
|
NLSLINKS_ru_RU.UTF-8 = ru_RU.CP1251 ru_RU.CP866 ru_RU.ISO8859-5 ru_RU.KOI8-R
|
|
|
|
NLSLINKS_uk_UA.UTF-8 = uk_UA.ISO8859-5 uk_UA.KOI8-U
|
2011-02-26 18:54:54 +00:00
|
|
|
.else
|
|
|
|
# Above links can be installed from ports/shells/tcsh_nls
|
|
|
|
|
|
|
|
GENHDRS+= iconv.h
|
2006-02-19 06:40:29 +00:00
|
|
|
SRCS+= iconv_stub.c
|
2011-02-26 18:54:54 +00:00
|
|
|
|
|
|
|
iconv.h: ${.CURDIR}/iconv_stub.h
|
2015-01-16 21:39:08 +00:00
|
|
|
${CP} ${.CURDIR}/iconv_stub.h ${.TARGET}
|
2011-02-26 18:54:54 +00:00
|
|
|
.endif
|
2006-02-19 06:40:29 +00:00
|
|
|
.endif
|
|
|
|
|
2002-07-02 12:37:09 +00:00
|
|
|
NLSNAME= tcsh
|
|
|
|
|
|
|
|
.for catalog in ${CATALOGS}
|
|
|
|
NLS+= ${catalog:C/.*://}
|
|
|
|
NLSSRCDIR_${catalog:C/.*://}= ${TCSHDIR}/nls/${catalog:C/:.*//}
|
2006-02-19 06:40:29 +00:00
|
|
|
NLSSRCFILES_${catalog:C/.*://}!= cd ${NLSSRCDIR_${catalog:C/.*://}}; echo charset set[0-9]*
|
2002-07-02 12:37:09 +00:00
|
|
|
.endfor
|
|
|
|
|
2000-04-18 07:31:36 +00:00
|
|
|
csh.1: tcsh.man
|
2003-06-06 13:46:55 +00:00
|
|
|
cat ${.ALLSRC} > ${.TARGET}
|
2000-04-18 07:31:36 +00:00
|
|
|
|
2000-12-03 16:28:56 +00:00
|
|
|
build-tools: gethost
|
|
|
|
|
2000-11-30 21:38:37 +00:00
|
|
|
gethost: gethost.c sh.err.h tc.const.h sh.h
|
|
|
|
@rm -f ${.TARGET}
|
2011-02-26 18:54:54 +00:00
|
|
|
${CC} -o gethost ${LDFLAGS} ${CFLAGS:C/-DHAVE_ICONV//} \
|
|
|
|
${TCSHDIR}/gethost.c
|
2000-11-30 21:38:37 +00:00
|
|
|
|
2012-02-22 03:36:15 +00:00
|
|
|
tc.defs.c: gethost ${TCSHDIR}/host.defs
|
2000-11-30 21:38:37 +00:00
|
|
|
@rm -f ${.TARGET}
|
|
|
|
@echo "/* Do not edit this file, make creates it */" > ${.TARGET}
|
2012-02-22 03:36:15 +00:00
|
|
|
./gethost ${TCSHDIR}/host.defs >> ${.TARGET}
|
2000-11-30 21:38:37 +00:00
|
|
|
|
2000-04-18 07:31:36 +00:00
|
|
|
ed.defns.h: ed.defns.c
|
|
|
|
@rm -f ${.TARGET}
|
|
|
|
@echo '/* Do not edit this file, make creates it. */' > ${.TARGET}
|
|
|
|
@echo '#ifndef _h_ed_defns' >> ${.TARGET}
|
|
|
|
@echo '#define _h_ed_defns' >> ${.TARGET}
|
|
|
|
grep '[FV]_' ${TCSHDIR}/ed.defns.c | grep '^#define' >> ${.TARGET}
|
|
|
|
@echo '#endif /* _h_ed_defns */' >> ${.TARGET}
|
1994-05-26 06:18:55 +00:00
|
|
|
|
2000-04-18 07:31:36 +00:00
|
|
|
sh.err.h: sh.err.c
|
1997-08-07 21:42:17 +00:00
|
|
|
@rm -f ${.TARGET}
|
|
|
|
@echo '/* Do not edit this file, make creates it. */' > ${.TARGET}
|
2000-04-18 07:31:36 +00:00
|
|
|
@echo '#ifndef _h_sh_err' >> ${.TARGET}
|
|
|
|
@echo '#define _h_sh_err' >> ${.TARGET}
|
2000-11-30 21:38:37 +00:00
|
|
|
grep 'ERR_' ${.ALLSRC} | grep '^#define' >> ${.TARGET}
|
2000-04-18 07:31:36 +00:00
|
|
|
@echo '#endif /* _h_sh_err */' >> ${.TARGET}
|
1994-05-26 06:18:55 +00:00
|
|
|
|
2000-04-18 07:31:36 +00:00
|
|
|
tc.const.h: tc.const.c sh.char.h config.h config_f.h sh.types.h sh.err.h
|
1997-08-08 00:49:25 +00:00
|
|
|
@rm -f ${.TARGET}
|
|
|
|
@echo '/* Do not edit this file, make creates it. */' > ${.TARGET}
|
2000-04-18 07:31:36 +00:00
|
|
|
@echo '#ifndef _h_tc_const' >> ${.TARGET}
|
|
|
|
@echo '#define _h_tc_const' >> ${.TARGET}
|
2016-03-24 21:48:13 +00:00
|
|
|
${CC:N${CCACHE_BIN}} -E ${CFLAGS:C/-DHAVE_ICONV//} ${.ALLSRC} -D_h_tc_const | \
|
2011-02-26 18:54:54 +00:00
|
|
|
grep 'Char STR' | \
|
1994-05-26 06:18:55 +00:00
|
|
|
sed -e 's/Char \([a-zA-Z0-9_]*\)\(.*\)/extern Char \1[];/' | \
|
1997-08-08 00:49:25 +00:00
|
|
|
sort >> ${.TARGET}
|
2000-04-18 07:31:36 +00:00
|
|
|
@echo '#endif /* _h_tc_const */' >> ${.TARGET}
|
1994-05-26 06:18:55 +00:00
|
|
|
|
|
|
|
.include <bsd.prog.mk>
|