]>
Commit | Line | Data |
---|---|---|
71aad674 | 1 | # @(#)Makefile 8.4 (Berkeley) 5/5/95 |
deb63bfb | 2 | # $FreeBSD: head/bin/sh/Makefile 301285 2016-06-03 19:25:41Z bdrewery $ |
71aad674 A |
3 | |
4 | .include <src.opts.mk> | |
5 | ||
deb63bfb | 6 | PACKAGE=runtime |
71aad674 A |
7 | PROG= sh |
8 | INSTALLFLAGS= -S | |
9 | SHSRCS= alias.c arith_yacc.c arith_yylex.c cd.c echo.c error.c eval.c \ | |
10 | exec.c expand.c \ | |
11 | histedit.c input.c jobs.c kill.c mail.c main.c memalloc.c miscbltin.c \ | |
12 | mystring.c options.c output.c parser.c printf.c redir.c show.c \ | |
13 | test.c trap.c var.c | |
14 | GENSRCS= builtins.c nodes.c syntax.c | |
15 | GENHDRS= builtins.h nodes.h syntax.h token.h | |
16 | SRCS= ${SHSRCS} ${GENSRCS} ${GENHDRS} | |
17 | ||
18 | # MLINKS for Shell built in commands for which there are no userland | |
19 | # utilities of the same name are handled with the associated manpage, | |
20 | # builtin.1 in share/man/man1/. | |
21 | ||
22 | LIBADD= edit | |
23 | ||
24 | CFLAGS+=-DSHELL -I. -I${.CURDIR} | |
25 | # for debug: | |
26 | # DEBUG_FLAGS+= -g -DDEBUG=2 -fno-inline | |
27 | WARNS?= 2 | |
28 | WFORMAT=0 | |
29 | ||
30 | .PATH: ${.CURDIR}/bltin \ | |
31 | ${.CURDIR}/../kill \ | |
32 | ${.CURDIR}/../test \ | |
33 | ${.CURDIR}/../../usr.bin/printf | |
34 | ||
35 | CLEANFILES+= mknodes mknodes.o \ | |
36 | mksyntax mksyntax.o | |
37 | CLEANFILES+= ${GENSRCS} ${GENHDRS} | |
38 | ||
39 | build-tools: mknodes mksyntax | |
40 | ||
41 | .ORDER: builtins.c builtins.h | |
deb63bfb | 42 | builtins.h: .NOMETA |
71aad674 A |
43 | builtins.c builtins.h: mkbuiltins builtins.def |
44 | sh ${.CURDIR}/mkbuiltins ${.CURDIR} | |
45 | ||
46 | # XXX this is just to stop the default .c rule being used, so that the | |
47 | # intermediate object has a fixed name. | |
48 | # XXX we have a default .c rule, but no default .o rule. | |
deb63bfb | 49 | mknodes.o mksyntax.o: ${BUILD_TOOLS_META} |
71aad674 | 50 | ${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET} |
deb63bfb A |
51 | mknodes: mknodes.o ${BUILD_TOOLS_META} |
52 | mksyntax: mksyntax.o ${BUILD_TOOLS_META} | |
71aad674 A |
53 | |
54 | .ORDER: nodes.c nodes.h | |
deb63bfb | 55 | nodes.h: .NOMETA |
71aad674 | 56 | nodes.c nodes.h: mknodes nodetypes nodes.c.pat |
deb63bfb | 57 | ${BTOOLSPATH:U.}/mknodes ${.CURDIR}/nodetypes ${.CURDIR}/nodes.c.pat |
71aad674 A |
58 | |
59 | .ORDER: syntax.c syntax.h | |
deb63bfb | 60 | syntax.h: .NOMETA |
71aad674 | 61 | syntax.c syntax.h: mksyntax |
deb63bfb | 62 | ${BTOOLSPATH:U.}/mksyntax |
71aad674 A |
63 | |
64 | token.h: mktokens | |
65 | sh ${.CURDIR}/mktokens | |
66 | ||
67 | .if ${MK_TESTS} != "no" | |
68 | SUBDIR+= tests | |
69 | .endif | |
70 | ||
71 | .include <bsd.prog.mk> |