]>
Commit | Line | Data |
---|---|---|
cf7098dd MM |
1 | diff -u ash-0.4.0/Makefile ash-0.4.0-/Makefile |
2 | --- ash-0.4.0/Makefile Fri Jan 12 17:50:34 2001 | |
3 | +++ ash-0.4.0-/Makefile Tue Apr 24 00:49:56 2001 | |
4 | @@ -7,56 +7,68 @@ | |
5 | SHSRCS= 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 parser.c redir.c show.c trap.c output.c var.c \ | |
8 | - test.c | |
9 | -GENSRCS=arith.c arith.h arith_lex.c builtins.c builtins.h init.c nodes.c \ | |
10 | - nodes.h syntax.c syntax.h token.h | |
11 | + test.c setmode.c test.c | |
12 | +GENSRCS=builtins.c builtins.h init.c nodes.c arith.c arith.h lex.yy.c \ | |
13 | + nodes.h syntax.c syntax.h token.h signames.c | |
14 | SRCS= ${SHSRCS} ${GENSRCS} | |
15 | ||
16 | -LDADD+= -ll -ledit -ltermcap | |
17 | -DPADD+= ${LIBL} ${LIBEDIT} ${LIBTERMCAP} | |
18 | +OBJS=alias.o cd.o bltin/echo.o error.o eval.o exec.o expand.o \ | |
19 | + histedit.o input.o jobs.o mail.o main.o memalloc.o miscbltin.o \ | |
20 | + mystring.o options.o output.o parser.o redir.o show.o \ | |
21 | + trap.o var.o bltin/test.o signames.o \ | |
22 | + builtins.o init.o nodes.o syntax.o arith.o lex.yy.o \ | |
23 | + setmode.o bltin/times.o | |
24 | + | |
25 | +OPT_FLAGS=-O2 -g | |
26 | +LDFLAGS=-g | |
27 | +CFLAGS=$(OPT_FLAGS) -DSHELL -I. -DNO_HISTORY -DBSD=1 -DSMALL -D_GNU_SOURCE \ | |
28 | + -DGLOB_BROKEN -D__COPYRIGHT\(x\)= -D__RCSID\(x\)= -D_DIAGASSERT\(x\)= | |
29 | + | |
30 | +all: $(PROG) | |
31 | + | |
32 | +$(PROG): build-tools $(GENSRCS) $(GENHDRS) $(OBJS) | |
29f6cd4a | 33 | + $(CC) $(LDFLAGS) -o $(PROG) $(OBJS) $(LDLIBS) -lfl |
cf7098dd MM |
34 | + |
35 | +lex.yy.c: arith_lex.l | |
36 | + flex -8 $< | |
37 | + | |
38 | +CLEANFILES+= mkinit mkinit.o mknodes mknodes.o \ | |
39 | + mksyntax mksyntax.o | |
40 | + | |
41 | +CLEANFILES+= ${GENSRCS} ${GENHDRS} | |
42 | + | |
43 | +build-tools: mkinit mknodes mksyntax | |
44 | + | |
45 | +.ORDER: builtins.c builtins.h | |
46 | +builtins.c builtins.h: mkbuiltins builtins.def | |
47 | + sh mkbuiltins shell.h builtins.def `pwd` | |
48 | + | |
49 | +INIT_DEPS = alias.c eval.c exec.c input.c jobs.c options.c parser.c \ | |
50 | + redir.c trap.c var.c output.c | |
51 | + | |
52 | +init.c: mkinit $(INIT_DEPS) | |
53 | + ./mkinit $(INIT_DEPS) | |
54 | + | |
55 | +mkinit: mkinit.o | |
56 | +mknodes: mknodes.o | |
57 | +mksyntax: mksyntax.o | |
58 | ||
59 | -LFLAGS= -8 # 8-bit lex scanner for arithmetic | |
60 | -YFLAGS= -d | |
61 | - | |
62 | -CPPFLAGS+=-DSHELL -I. -I${.CURDIR} | |
63 | - | |
64 | -.PATH: ${.CURDIR}/bltin ${.CURDIR}/../../usr.bin/printf ${.CURDIR}/../test | |
65 | - | |
66 | -CLEANFILES+= mkinit mknodes mksyntax | |
67 | -CLEANFILES+= ${GENSRCS} y.tab.h | |
68 | - | |
69 | -token.h: mktokens | |
70 | - sh ${.ALLSRC} | |
71 | - | |
72 | -builtins.c builtins.h: mkbuiltins shell.h builtins.def | |
73 | - sh ${.ALLSRC} ${.OBJDIR} | |
74 | - | |
75 | -init.c: mkinit ${SHSRCS} | |
76 | - ./${.ALLSRC} | |
77 | +signames.c: mksignames | |
78 | + ./mksignames | |
79 | ||
80 | nodes.c nodes.h: mknodes nodetypes nodes.c.pat | |
81 | - ./${.ALLSRC} | |
82 | + ./mknodes ./nodetypes ./nodes.c.pat | |
83 | ||
84 | syntax.c syntax.h: mksyntax | |
85 | - ./${.ALLSRC} | |
86 | - | |
87 | -mkinit: mkinit.c | |
88 | - ${HOST_LINK.c} -o mkinit ${.IMPSRC} | |
89 | - | |
90 | -mknodes: mknodes.c | |
91 | - ${HOST_LINK.c} -o mknodes ${.IMPSRC} | |
92 | + ./mksyntax | |
93 | ||
94 | -.if (${MACHINE_ARCH} == "powerpc") || \ | |
95 | - (${MACHINE_ARCH} == "arm32") || \ | |
96 | - (${MACHINE_ARCH} == "arm26") | |
97 | -TARGET_CHARFLAG= -DTARGET_CHAR="u_int8_t" | |
98 | -.else | |
99 | -TARGET_CHARFLAG= -DTARGET_CHAR="int8_t" | |
100 | -.endif | |
101 | +arith.c arith.h: arith.y | |
102 | + yacc -d arith.y | |
103 | + mv y.tab.h arith.h | |
104 | + mv y.tab.c arith.c | |
105 | ||
106 | -mksyntax: mksyntax.c | |
107 | - ${HOST_LINK.c} ${TARGET_CHARFLAG} -o mksyntax ${.IMPSRC} | |
108 | - | |
109 | -.include <bsd.prog.mk> | |
110 | +token.h: mktokens | |
111 | + sh ./mktokens | |
112 | ||
113 | -${OBJS}: builtins.h nodes.h syntax.h token.h | |
114 | +clean: | |
115 | + rm -f $(PROG) $(OBJS) $(CLEANFILES) core |