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