Makefile revision 1.36
1# $NetBSD: Makefile,v 1.36 2013/01/23 16:39:03 christos Exp $ 2# @(#)Makefile 8.1 (Berkeley) 5/31/93 3# 4# C Shell with process control; VM/UNIX VAX Makefile 5# Bill Joy UC Berkeley; Jim Kulp IIASA, Austria 6# 7# To profile, put -DPROF in DFLAGS and -pg in COPTS, and recompile. 8 9.include <bsd.own.mk> 10 11PROG= csh 12DFLAGS=-DBUILTIN -DFILEC -DNLS -DSHORT_STRINGS 13# - Editor history not always aligned with shell history, 14# should implement internally 15# - Does not handle escaped prompts. 16# - Does not do completion 17DFLAGS+=-DEDIT 18CPPFLAGS+=-I${.CURDIR} -I. ${DFLAGS} 19SRCS= alloc.c char.c const.c csh.c dir.c dol.c err.c exec.c exp.c file.c \ 20 func.c glob.c hist.c init.c lex.c misc.c parse.c printf.c proc.c \ 21 sem.c set.c str.c time.c 22.PATH: ${NETBSDSRCDIR}/usr.bin/printf 23 24MLINKS= csh.1 limit.1 csh.1 alias.1 csh.1 bg.1 csh.1 dirs.1 csh.1 fg.1 \ 25 csh.1 foreach.1 csh.1 history.1 csh.1 jobs.1 csh.1 popd.1 \ 26 csh.1 pushd.1 csh.1 rehash.1 csh.1 repeat.1 csh.1 suspend.1 \ 27 csh.1 stop.1 csh.1 source.1 28 29DPSRCS+= errnum.h const.h 30CLEANFILES+= errnum.h const.h 31 32errnum.h: err.c 33 ${_MKTARGET_CREATE} 34 rm -f ${.TARGET} 35 (\ 36 echo '/* Do not edit this file, make creates it. */' ;\ 37 echo '#ifndef _h_sh_errnum' ;\ 38 echo '#define _h_sh_errnum' ;\ 39 egrep 'ERR_' ${.ALLSRC} | egrep '^#define' ;\ 40 echo '#endif /* _h_sh_errnum */' ;\ 41 ) > ${.TARGET} 42 43const.c: errnum.h 44const.h: const.c 45 ${_MKTARGET_CREATE} 46 rm -f ${.TARGET} 47 echo '/* Do not edit this file, make creates it. */' > ${.TARGET} 48 ${CC} -E ${CPPFLAGS} ${.ALLSRC} | egrep 'Char STR' | \ 49 ${TOOL_SED} -e 's/Char \([a-zA-Z0-9_]*\)\(.*\)/extern Char \1[];/' | \ 50 sort >> ${.TARGET} 51 52.if make(install) 53SUBDIR+=USD.doc 54.endif 55 56# XXX Only GCC 4.1 problem 57.if defined(HAVE_GCC) && ${HAVE_GCC} == 4 && ${MACHINE_ARCH} == "vax" 58COPTS.parse.c+= -O0 59.endif 60COPTS.err.c = -Wno-format-nonliteral 61COPTS.printf.c = -Wno-format-nonliteral 62COPTS.proc.c = -Wno-format-nonliteral 63 64.if !empty(DFLAGS:M*EDIT) 65LDADD+=-ledit -lutil 66DPADD+=${LIBEDIT} ${LIBUTIL} 67.else 68LDADD+=-lutil 69DPADD+=${LIBUTIL} 70.endif 71 72.include <bsd.prog.mk> 73.include <bsd.subdir.mk> 74