1 # $NetBSD: Makefile,v 1.34 2013/01/22 20:35:29 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 11 PROG= csh 12 DFLAGS=-DBUILTIN -DFILEC -DNLS -DSHORT_STRINGS 13 # - Not integrated with history 14 # - Does not handle escaped prompts. 15 # - Does not do completion 16 # DFLAGS+=-DEDIT 17 CPPFLAGS+=-I${.CURDIR} -I. ${DFLAGS} 18 SRCS= alloc.c char.c const.c csh.c dir.c dol.c err.c exec.c exp.c file.c \ 19 func.c glob.c hist.c init.c lex.c misc.c parse.c printf.c proc.c \ 20 sem.c set.c str.c time.c 21 .PATH: ${NETBSDSRCDIR}/usr.bin/printf 22 23 MLINKS= csh.1 limit.1 csh.1 alias.1 csh.1 bg.1 csh.1 dirs.1 csh.1 fg.1 \ 24 csh.1 foreach.1 csh.1 history.1 csh.1 jobs.1 csh.1 popd.1 \ 25 csh.1 pushd.1 csh.1 rehash.1 csh.1 repeat.1 csh.1 suspend.1 \ 26 csh.1 stop.1 csh.1 source.1 27 28 DPSRCS+= errnum.h const.h 29 CLEANFILES+= errnum.h const.h 30 31 errnum.h: err.c 32 ${_MKTARGET_CREATE} 33 rm -f ${.TARGET} 34 (\ 35 echo '/* Do not edit this file, make creates it. */' ;\ 36 echo '#ifndef _h_sh_errnum' ;\ 37 echo '#define _h_sh_errnum' ;\ 38 egrep 'ERR_' ${.ALLSRC} | egrep '^#define' ;\ 39 echo '#endif /* _h_sh_errnum */' ;\ 40 ) > ${.TARGET} 41 42 const.c: errnum.h 43 const.h: const.c 44 ${_MKTARGET_CREATE} 45 rm -f ${.TARGET} 46 echo '/* Do not edit this file, make creates it. */' > ${.TARGET} 47 ${CC} -E ${CPPFLAGS} ${.ALLSRC} | egrep 'Char STR' | \ 48 ${TOOL_SED} -e 's/Char \([a-zA-Z0-9_]*\)\(.*\)/extern Char \1[];/' | \ 49 sort >> ${.TARGET} 50 51 .if make(install) 52 SUBDIR+=USD.doc 53 .endif 54 55 # XXX Only GCC 4.1 problem 56 .if defined(HAVE_GCC) && ${HAVE_GCC} == 4 && ${MACHINE_ARCH} == "vax" 57 COPTS.parse.c+= -O0 58 .endif 59 COPTS.err.c = -Wno-format-nonliteral 60 COPTS.printf.c = -Wno-format-nonliteral 61 COPTS.proc.c = -Wno-format-nonliteral 62 63 .if 0 64 LDADD+=-lutil 65 DPADD+=${LIBUTIL} 66 .elese 67 LDADD+=-ledit -lutil 68 DPADD+=${LIBEDIT} ${LIBUTIL} 69 .endif 70 71 .include <bsd.prog.mk> 72 .include <bsd.subdir.mk> 73