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