| @@ -1,35 +1,34 @@ | | | @@ -1,35 +1,34 @@ |
1 | # $NetBSD: Makefile,v 1.88 2009/12/11 08:39:42 uebayasi Exp $ | | 1 | # $NetBSD: Makefile,v 1.89 2009/12/14 05:13:38 christos Exp $ |
2 | # @(#)Makefile 8.4 (Berkeley) 5/5/95 | | 2 | # @(#)Makefile 8.4 (Berkeley) 5/5/95 |
3 | | | 3 | |
4 | .include <bsd.own.mk> | | 4 | .include <bsd.own.mk> |
5 | | | 5 | |
6 | YHEADER=1 | | 6 | YHEADER=1 |
7 | PROG= sh | | 7 | PROG= sh |
8 | SHSRCS= alias.c cd.c echo.c error.c eval.c exec.c expand.c \ | | 8 | SHSRCS= alias.c cd.c echo.c error.c eval.c exec.c expand.c \ |
9 | histedit.c input.c jobs.c mail.c main.c memalloc.c miscbltin.c \ | | 9 | histedit.c input.c jobs.c mail.c main.c memalloc.c miscbltin.c \ |
10 | mystring.c options.c parser.c redir.c show.c trap.c output.c var.c \ | | 10 | mystring.c options.c parser.c redir.c show.c trap.c output.c var.c \ |
11 | test.c kill.c syntax.c | | 11 | test.c kill.c syntax.c |
12 | GENSRCS=arith.c arith_lex.c builtins.c init.c nodes.c | | 12 | GENSRCS=arith.c arith_lex.c builtins.c init.c nodes.c |
13 | GENHDRS=arith.h builtins.h nodes.h token.h | | 13 | GENHDRS=arith.h builtins.h nodes.h token.h |
14 | SRCS= ${SHSRCS} ${GENSRCS} | | 14 | SRCS= ${SHSRCS} ${GENSRCS} |
15 | | | 15 | |
16 | DPSRCS+=${GENHDRS} | | 16 | DPSRCS+=${GENHDRS} |
17 | | | 17 | |
18 | LDADD+= -ll -ledit -ltermcap | | 18 | LDADD+= -ll -ledit -ltermcap |
19 | DPADD+= ${LIBL} ${LIBEDIT} ${LIBTERMCAP} | | 19 | DPADD+= ${LIBL} ${LIBEDIT} ${LIBTERMCAP} |
20 | | | 20 | |
21 | LFLAGS= -8 # 8-bit lex scanner for arithmetic | | 21 | LFLAGS= -8 # 8-bit lex scanner for arithmetic |
22 | YFLAGS= -d | | | |
23 | | | 22 | |
24 | # Environment for scripts executed during build. | | 23 | # Environment for scripts executed during build. |
25 | SCRIPT_ENV= \ | | 24 | SCRIPT_ENV= \ |
26 | AWK=${TOOL_AWK:Q} \ | | 25 | AWK=${TOOL_AWK:Q} \ |
27 | SED=${TOOL_SED:Q} | | 26 | SED=${TOOL_SED:Q} |
28 | | | 27 | |
29 | # The .depend file can get references to these temporary files | | 28 | # The .depend file can get references to these temporary files |
30 | .OPTIONAL: lex.yy.c y.tab.c | | 29 | .OPTIONAL: lex.yy.c y.tab.c |
31 | | | 30 | |
32 | .ifdef CRUNCHEDPROG | | 31 | .ifdef CRUNCHEDPROG |
33 | LFLAGS+=-L | | 32 | LFLAGS+=-L |
34 | YFLAGS+=-l | | 33 | YFLAGS+=-l |
35 | .endif | | 34 | .endif |
| @@ -45,46 +44,37 @@ CPPFLAGS+=-DSMALL | | | @@ -45,46 +44,37 @@ CPPFLAGS+=-DSMALL |
45 | .else | | 44 | .else |
46 | SRCS+=printf.c | | 45 | SRCS+=printf.c |
47 | .endif | | 46 | .endif |
48 | | | 47 | |
49 | .PATH: ${.CURDIR}/bltin ${NETBSDSRCDIR}/bin/test \ | | 48 | .PATH: ${.CURDIR}/bltin ${NETBSDSRCDIR}/bin/test \ |
50 | ${NETBSDSRCDIR}/usr.bin/printf \ | | 49 | ${NETBSDSRCDIR}/usr.bin/printf \ |
51 | ${NETBSDSRCDIR}/bin/kill | | 50 | ${NETBSDSRCDIR}/bin/kill |
52 | | | 51 | |
53 | CLEANFILES+= ${GENSRCS} ${GENHDRS} y.tab.h | | 52 | CLEANFILES+= ${GENSRCS} ${GENHDRS} y.tab.h |
54 | CLEANFILES+= trace | | 53 | CLEANFILES+= trace |
55 | | | 54 | |
56 | token.h: mktokens | | 55 | token.h: mktokens |
57 | ${_MKTARGET_CREATE} | | 56 | ${_MKTARGET_CREATE} |
58 | ${GENCMD} ${.TARGET} \ | | | |
59 | ${SCRIPT_ENV} ${HOST_SH} ${.ALLSRC} | | 57 | ${SCRIPT_ENV} ${HOST_SH} ${.ALLSRC} |
60 | | | 58 | |
61 | builtins.c builtins.h: mkbuiltins shell.h builtins.def | | 59 | .ORDER: builtins.h builtins.c |
| | | 60 | builtins.h builtins.c: mkbuiltins shell.h builtins.def |
62 | ${_MKTARGET_CREATE} | | 61 | ${_MKTARGET_CREATE} |
63 | ${GENCMD} ${.TARGET} \ | | 62 | ${SCRIPT_ENV} ${HOST_SH} ${.ALLSRC} ${.OBJDIR} |
64 | ${SCRIPT_ENV} ${HOST_SH} ${.ALLSRC} . | | 63 | [ -f builtins.h ] |
65 | | | 64 | |
66 | init.c: mkinit.sh ${SHSRCS} | | 65 | init.c: mkinit.sh ${SHSRCS} |
67 | ${_MKTARGET_CREATE} | | 66 | ${_MKTARGET_CREATE} |
68 | ${GENCMD} ${.TARGET} \ | | | |
69 | ${SCRIPT_ENV} ${HOST_SH} ${.ALLSRC} | | 67 | ${SCRIPT_ENV} ${HOST_SH} ${.ALLSRC} |
70 | | | 68 | |
| | | 69 | .ORDER: nodes.h nodes.c |
71 | nodes.c nodes.h: mknodes.sh nodetypes nodes.c.pat | | 70 | nodes.c nodes.h: mknodes.sh nodetypes nodes.c.pat |
72 | ${_MKTARGET_CREATE} | | 71 | ${_MKTARGET_CREATE} |
73 | ${GENCMD} ${.TARGET} \ | | 72 | ${SCRIPT_ENV} ${HOST_SH} ${.ALLSRC} ${.OBJDIR} |
74 | ${SCRIPT_ENV} ${HOST_SH} ${.ALLSRC} . | | 73 | [ -f nodes.h ] |
75 | | | | |
76 | arith.c arith.h: arith.y | | | |
77 | ${_MKTARGET_CREATE} | | | |
78 | ${GENCMD} y.tab.${.TARGET:T:E} \ | | | |
79 | ${YACC.y} ${.ALLSRC} | | | |
80 | | | 74 | |
81 | .if ${USETOOLS} == "yes" | | 75 | .if ${USETOOLS} == "yes" |
82 | COMPATOBJDIR!= cd ${NETBSDSRCDIR}/tools/compat && ${PRINTOBJDIR} | | 76 | COMPATOBJDIR!= cd ${NETBSDSRCDIR}/tools/compat && ${PRINTOBJDIR} |
83 | NBCOMPATLIB= -L${COMPATOBJDIR} -lnbcompat | | 77 | NBCOMPATLIB= -L${COMPATOBJDIR} -lnbcompat |
84 | .endif | | 78 | .endif |
85 | | | 79 | |
86 | .include <bsd.prog.mk> | | 80 | .include <bsd.prog.mk> |
87 | | | | |
88 | # override | | | |
89 | .y.c: | | | |
90 | .y.h: | | | |