]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - bin/sh/Makefile
MFV r324714:
[FreeBSD/FreeBSD.git] / bin / sh / Makefile
1 #       @(#)Makefile    8.4 (Berkeley) 5/5/95
2 # $FreeBSD$
3
4 .include <src.opts.mk>
5
6 PACKAGE=runtime
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:H}/kill \
32         ${.CURDIR:H}/test \
33         ${SRCTOP}/usr.bin/printf
34
35 CLEANFILES+= mknodes mksyntax
36 CLEANFILES+= ${GENSRCS} ${GENHDRS}
37
38 build-tools: mknodes mksyntax
39
40 .ORDER: builtins.c builtins.h
41 builtins.h: .NOMETA
42 builtins.c builtins.h: mkbuiltins builtins.def
43         sh ${.CURDIR}/mkbuiltins ${.CURDIR}
44
45 mknodes mksyntax: ${BUILD_TOOLS_META}
46
47 .ORDER: nodes.c nodes.h
48 nodes.h: .NOMETA
49 nodes.c nodes.h: mknodes nodetypes nodes.c.pat
50         ${BTOOLSPATH:U.}/mknodes ${.CURDIR}/nodetypes ${.CURDIR}/nodes.c.pat
51
52 .ORDER: syntax.c syntax.h
53 syntax.h: .NOMETA
54 syntax.c syntax.h: mksyntax
55         ${BTOOLSPATH:U.}/mksyntax
56
57 token.h: mktokens
58         sh ${.CURDIR}/mktokens
59
60 HAS_TESTS=
61 SUBDIR.${MK_TESTS}+= tests
62
63 .include <bsd.prog.mk>