]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - bin/sh/Makefile
Merge LLVM libunwind trunk r351319, from just before upstream's
[FreeBSD/FreeBSD.git] / bin / sh / Makefile
1 #       @(#)Makefile    8.4 (Berkeley) 5/5/95
2 # $FreeBSD$
3
4 .include <src.opts.mk>
5
6 CONFGROUPS=     ETC ROOT
7 ETC=    profile
8 ROOT=   dot.shrc dot.profile
9 ROOTDIR=        /root
10 ROOTNAME_dot.shrc=      .shrc
11 ROOTNAME_dot.profile=   .profile
12 PACKAGE=runtime
13 PROG=   sh
14 INSTALLFLAGS= -S
15 SHSRCS= alias.c arith_yacc.c arith_yylex.c cd.c echo.c error.c eval.c \
16         exec.c expand.c \
17         histedit.c input.c jobs.c kill.c mail.c main.c memalloc.c miscbltin.c \
18         mystring.c options.c output.c parser.c printf.c redir.c show.c \
19         test.c trap.c var.c
20 GENSRCS= builtins.c nodes.c syntax.c
21 GENHDRS= builtins.h nodes.h syntax.h token.h
22 SRCS= ${SHSRCS} ${GENSRCS} ${GENHDRS}
23
24 # MLINKS for Shell built in commands for which there are no userland
25 # utilities of the same name are handled with the associated manpage,
26 # builtin.1 in share/man/man1/.
27
28 LIBADD= edit
29
30 CFLAGS+=-DSHELL -I. -I${.CURDIR}
31 # for debug:
32 # DEBUG_FLAGS+= -g -DDEBUG=2 -fno-inline
33 WARNS?= 2
34 WFORMAT=0
35
36 .PATH:  ${.CURDIR}/bltin \
37         ${.CURDIR:H}/kill \
38         ${.CURDIR:H}/test \
39         ${SRCTOP}/usr.bin/printf
40
41 CLEANFILES+= mknodes mksyntax
42 CLEANFILES+= ${GENSRCS} ${GENHDRS}
43
44 build-tools: mknodes mksyntax
45
46 .ORDER: builtins.c builtins.h
47 builtins.h: .NOMETA
48 builtins.c builtins.h: mkbuiltins builtins.def
49         sh ${.CURDIR}/mkbuiltins ${.CURDIR}
50
51 mknodes mksyntax: ${BUILD_TOOLS_META}
52
53 .ORDER: nodes.c nodes.h
54 nodes.h: .NOMETA
55 nodes.c nodes.h: mknodes nodetypes nodes.c.pat
56         ${BTOOLSPATH:U.}/mknodes ${.CURDIR}/nodetypes ${.CURDIR}/nodes.c.pat
57
58 .ORDER: syntax.c syntax.h
59 syntax.h: .NOMETA
60 syntax.c syntax.h: mksyntax
61         ${BTOOLSPATH:U.}/mksyntax
62
63 token.h: mktokens
64         sh ${.CURDIR}/mktokens
65
66 HAS_TESTS=
67 SUBDIR.${MK_TESTS}+= tests
68
69 beforeinstallconfig:
70         rm -f ${DESTDIR}/.profile
71
72 afterinstallconfig:
73         ${INSTALL_LINK} ${TAG_ARGS} ${DESTDIR}/root/.profile ${DESTDIR}/.profile
74
75 .include <bsd.prog.mk>