]> git.cameronkatri.com Git - apple_cmds.git/blob - shell_cmds/sh/Makefile
md5: Don't symlink non working bins, setuid appropriate bins
[apple_cmds.git] / shell_cmds / sh / Makefile
1 # @(#)Makefile 8.4 (Berkeley) 5/5/95
2 # $FreeBSD: head/bin/sh/Makefile 322515 2017-08-14 19:21:37Z ngie $
3 #
4 BINDIR=/bin
5
6 PACKAGE=runtime
7 PROG= sh
8 PROGNAME= ash
9 INSTALLFLAGS= -S
10 SHSRCS= alias.c arith_yacc.c arith_yylex.c cd.c echo.c error.c eval.c \
11 exec.c expand.c \
12 histedit.c input.c jobs.c kill.c mail.c main.c memalloc.c miscbltin.c \
13 mystring.c options.c output.c parser.c printf.c redir.c show.c \
14 test.c trap.c var.c
15 GENSRCS= builtins.c nodes.c syntax.c
16 GENHDRS= builtins.h nodes.h syntax.h token.h
17 SRCS= ${SHSRCS} ${GENSRCS} ${GENHDRS}
18
19 # MLINKS for Shell built in commands for which there are no userland
20 # utilities of the same name are handled with the associated manpage,
21 # builtin.1 in share/man/man1/.
22
23 LDADD=-ledit -liosexec
24
25 CFLAGS+=-DSHELL -I. -I${.CURDIR}
26 # for debug:
27 # DEBUG_FLAGS+= -g -DDEBUG=2 -fno-inline
28 #WARNS?= 2
29 WFORMAT=0
30
31 .PATH: ${.CURDIR}/bltin \
32 ${.CURDIR:H}/kill \
33 ${.CURDIR:H}/test \
34 ${.CURDIR}/../printf
35
36 CLEANFILES+= mknodes mknodes.o \
37 mksyntax mksyntax.o
38 CLEANFILES+= ${GENSRCS} ${GENHDRS}
39
40 build-tools: mknodes mksyntax
41
42 .ORDER: builtins.c builtins.h
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.
49 mknodes mksyntax:
50 clang ${.IMPSRC} ${.TARGET}.c -o ${.TARGET}
51
52 .ORDER: nodes.c nodes.h
53 nodes.c nodes.h: mknodes nodetypes nodes.c.pat
54 ./mknodes ${.CURDIR}/nodetypes ${.CURDIR}/nodes.c.pat
55
56 .ORDER: syntax.c syntax.h
57 syntax.c syntax.h: mksyntax
58 ./mksyntax
59
60 token.h: mktokens
61 sh ${.CURDIR}/mktokens
62
63 HAS_TESTS=
64 SUBDIR.${MK_TESTS}+= tests
65
66 .include <bsd.prog.mk>