Fri Jan 25 14:20:58 2013 UTC ()
Obey SMALLPROG and don't enable the editor


(christos)
diff -r1.36 -r1.37 src/bin/csh/Makefile

cvs diff -r1.36 -r1.37 src/bin/csh/Makefile (switch to unified diff)

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