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