version 1.1, 2012/10/11 11:59:09
|
version 1.2, 2012/10/12 08:22:46
|
Line 0
|
Line 1
|
|
# $FreeBSD: src/bin/csh/Makefile,v 1.42 2012/02/22 03:36:15 mp Exp $ |
|
# @(#)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. |
|
|
|
.include <bsd.own.mk> |
|
|
|
BINDIR = /usr/bin |
|
|
|
TCSHDIR= ${BSDSRC}/contrib/tcsh |
|
.PATH: ${TCSHDIR} |
|
|
|
PROG= csh |
|
DFLAGS= -D_PATH_TCSHELL='"/usr/bin/${PROG}"' |
|
CFLAGS+= -I. -I${.CURDIR} -I${TCSHDIR} ${DFLAGS} |
|
WARNS?= 1 |
|
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.char.h sh.dir.h sh.proc.h sh.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.nls.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 |
|
GENHDRS= ed.defns.h sh.err.h tc.const.h tc.defs.c |
|
SRCS+= ${GENHDRS} |
|
|
|
MLINKS= |
|
|
|
DPADD= ${LIBTERMCAP} ${LIBCRYPT} |
|
LDADD= -ltermcap -lcrypt |
|
|
|
LINKS= ${BINDIR}/csh ${BINDIR}/tcsh |
|
|
|
CLEANFILES= ${GENHDRS} gethost csh.1 |
|
|
|
CFLAGS+= -DNO_NLS_CATALOGS |
|
|
|
NLSNAME= tcsh |
|
|
|
csh.1: tcsh.man |
|
cat ${.ALLSRC} > ${.TARGET} |
|
|
|
build-tools: gethost |
|
|
|
gethost: gethost.c sh.err.h tc.const.h sh.h |
|
@rm -f ${.TARGET} |
|
${CC} -o gethost ${LDFLAGS} ${CFLAGS:C/-DHAVE_ICONV//} \ |
|
${TCSHDIR}/gethost.c |
|
|
|
tc.defs.c: gethost ${TCSHDIR}/host.defs |
|
@rm -f ${.TARGET} |
|
@echo "/* Do not edit this file, make creates it */" > ${.TARGET} |
|
./gethost ${TCSHDIR}/host.defs >> ${.TARGET} |
|
|
|
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} |
|
|
|
sh.err.h: sh.err.c |
|
@rm -f ${.TARGET} |
|
@echo '/* Do not edit this file, make creates it. */' > ${.TARGET} |
|
@echo '#ifndef _h_sh_err' >> ${.TARGET} |
|
@echo '#define _h_sh_err' >> ${.TARGET} |
|
grep 'ERR_' ${.ALLSRC} | grep '^#define' >> ${.TARGET} |
|
@echo '#endif /* _h_sh_err */' >> ${.TARGET} |
|
|
|
tc.const.h: tc.const.c sh.char.h config.h config_f.h sh.types.h sh.err.h |
|
@rm -f ${.TARGET} |
|
@echo '/* Do not edit this file, make creates it. */' > ${.TARGET} |
|
@echo '#ifndef _h_tc_const' >> ${.TARGET} |
|
@echo '#define _h_tc_const' >> ${.TARGET} |
|
${CC} -E ${CFLAGS:C/-DHAVE_ICONV//} ${.ALLSRC} -D_h_tc_const | \ |
|
grep 'Char STR' | \ |
|
sed -e 's/Char \([a-zA-Z0-9_]*\)\(.*\)/extern Char \1[];/' | \ |
|
sort >> ${.TARGET} |
|
@echo '#endif /* _h_tc_const */' >> ${.TARGET} |
|
|
|
.include <bsd.prog.mk> |