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.
|
|
|
|
|
2000-04-18 07:31:36 +00:00
|
|
|
TCSHDIR= ${.CURDIR}/../../contrib/tcsh
|
|
|
|
.PATH: ${TCSHDIR}
|
|
|
|
|
1994-05-26 06:18:55 +00:00
|
|
|
PROG= csh
|
2000-04-20 08:58:11 +00:00
|
|
|
SUBDIR= nls
|
2000-04-18 07:31:36 +00:00
|
|
|
DFLAGS= -D_PATH_TCSHELL='"${DESTDIR}/bin/${PROG}"'
|
|
|
|
CFLAGS+= -I${TCSHDIR} -I${.CURDIR} -I. ${DFLAGS}
|
|
|
|
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 \
|
|
|
|
sh.set.c sh.time.c sh.h sh.char.h sh.dir.h sh.proc.h
|
|
|
|
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 \
|
|
|
|
tc.func.c tc.os.c tc.os.h tc.printf.c tc.prompt.c \
|
|
|
|
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
|
|
|
|
SRCS+= tc.defs.c
|
1994-05-26 06:18:55 +00:00
|
|
|
|
1994-08-05 17:02:31 +00:00
|
|
|
MAN1= csh.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/.
|
|
|
|
|
2000-04-18 07:31:36 +00:00
|
|
|
DPADD+= ${LIBNCURSES} ${LIBCRYPT}
|
|
|
|
LDADD+= -lncurses -lcrypt
|
|
|
|
|
2000-04-19 15:15:19 +00:00
|
|
|
LINKS= ${BINDIR}/csh ${BINDIR}/tcsh
|
|
|
|
|
2000-04-18 07:31:36 +00:00
|
|
|
csh.1: tcsh.man
|
|
|
|
ln -sf ${.ALLSRC} ${.TARGET}
|
|
|
|
|
|
|
|
GENHDRS+= ed.defns.h tc.const.h sh.err.h
|
|
|
|
SRCS+= ${GENHDRS}
|
|
|
|
CLEANFILES+= ${GENHDRS}
|
1994-05-26 06:18:55 +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}
|
1997-08-07 21:42:17 +00:00
|
|
|
egrep 'ERR_' ${.ALLSRC} | egrep '^#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}
|
|
|
|
${CC} -E ${CFLAGS} ${.ALLSRC} -D_h_tc_const | egrep '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>
|