Deleted Added
full compact
Makefile (25221) Makefile (25903)
1# @(#)Makefile 8.4 (Berkeley) 5/5/95
1# @(#)Makefile 8.4 (Berkeley) 5/5/95
2# $Id: Makefile,v 1.17 1997/02/22 13:58:19 peter Exp $
2# $Id: Makefile,v 1.18 1997/04/28 03:03:23 steve Exp $
3
4PROG= sh
5SHSRCS= alias.c cd.c echo.c error.c eval.c exec.c expand.c \
6 histedit.c input.c jobs.c mail.c main.c memalloc.c miscbltin.c \
7 mystring.c options.c output.c parser.c printf.c redir.c show.c \
8 trap.c var.c
9GENSRCS= arith.c arith_lex.c builtins.c init.c nodes.c syntax.c
10SRCS= ${SHSRCS} ${GENSRCS}
11
3
4PROG= sh
5SHSRCS= alias.c cd.c echo.c error.c eval.c exec.c expand.c \
6 histedit.c input.c jobs.c mail.c main.c memalloc.c miscbltin.c \
7 mystring.c options.c output.c parser.c printf.c redir.c show.c \
8 trap.c var.c
9GENSRCS= arith.c arith_lex.c builtins.c init.c nodes.c syntax.c
10SRCS= ${SHSRCS} ${GENSRCS}
11
12LDADD+= -ll -ledit -ltermcap
13DPADD+= ${LIBL} ${LIBEDIT} ${LIBTERMCAP}
12DPADD+= ${LIBL} ${LIBEDIT} ${LIBTERMCAP}
13LDADD+= -ll -ledit -ltermcap
14
15LFLAGS= -8 # 8-bit lex scanner for arithmetic
16CFLAGS+=-DSHELL -I. -I${.CURDIR}
17# for debug:
18# CFLAGS+= -g -DDEBUG=2
19
20.PATH: ${.CURDIR}/bltin ${.CURDIR}/../../usr.bin/printf
21
22CLEANFILES+= builtins.h mkinit mkinit.o mknodes mknodes.o \
23 mksyntax mksyntax.o \
24 nodes.h syntax.h token.h y.tab.h
25CLEANFILES+= ${GENSRCS}
26
14
15LFLAGS= -8 # 8-bit lex scanner for arithmetic
16CFLAGS+=-DSHELL -I. -I${.CURDIR}
17# for debug:
18# CFLAGS+= -g -DDEBUG=2
19
20.PATH: ${.CURDIR}/bltin ${.CURDIR}/../../usr.bin/printf
21
22CLEANFILES+= builtins.h mkinit mkinit.o mknodes mknodes.o \
23 mksyntax mksyntax.o \
24 nodes.h syntax.h token.h y.tab.h
25CLEANFILES+= ${GENSRCS}
26
27beforedepend: token.h
27beforedepend: builtins.h nodes.h syntax.h token.h
28
28
29token.h: mktokens
30 sh ${.CURDIR}/mktokens
31
32builtins.h builtins.c: mkbuiltins builtins.def
29builtins.c builtins.h: mkbuiltins builtins.def
33 cd ${.CURDIR}; sh mkbuiltins ${.OBJDIR}
34
30 cd ${.CURDIR}; sh mkbuiltins ${.OBJDIR}
31
35init.c: mkinit ${SHSRCS}
32init.c: mkinit alias.c eval.c exec.c input.c jobs.c options.c parser.c \
33 redir.c trap.c var.c
36 ./mkinit ${.ALLSRC:S/^mkinit$//}
37
38nodes.c nodes.h: mknodes nodetypes nodes.c.pat
39 ./mknodes ${.CURDIR}/nodetypes ${.CURDIR}/nodes.c.pat
40
41syntax.c syntax.h: mksyntax
42 ./mksyntax
43
34 ./mkinit ${.ALLSRC:S/^mkinit$//}
35
36nodes.c nodes.h: mknodes nodetypes nodes.c.pat
37 ./mknodes ${.CURDIR}/nodetypes ${.CURDIR}/nodes.c.pat
38
39syntax.c syntax.h: mksyntax
40 ./mksyntax
41
44parser.o: token.h
42token.h: mktokens
43 sh ${.CURDIR}/mktokens
45
44
46.include <bsd.prog.mk>
45# Rules for object files that rely on generated headers.
46cd.o: nodes.h
47eval.o: builtins.h nodes.h syntax.h
48exec.o: builtins.h nodes.h syntax.h
49expand.o: nodes.h syntax.h
50input.o: syntax.h
51jobs.o: nodes.h syntax.h
52main.o: nodes.h
53mystring.o: syntax.h
54options.o: nodes.h
55output.o: syntax.h
56parser.o: nodes.h syntax.h token.h
57redir.o: nodes.h
58show.o: nodes.h
59trap.o: nodes.h syntax.h
60var.o: nodes.h syntax.h
47
61
48${OBJS}: builtins.h nodes.h syntax.h
62.include <bsd.prog.mk>