]> CyberLeo.Net >> Repos - FreeBSD/stable/10.git/blob - bin/sh/Makefile
Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.
[FreeBSD/stable/10.git] / bin / sh / Makefile
1 #       @(#)Makefile    8.4 (Berkeley) 5/5/95
2 # $FreeBSD$
3
4 PROG=   sh
5 INSTALLFLAGS= -S
6 SHSRCS= alias.c arith_yacc.c arith_yylex.c cd.c echo.c error.c eval.c \
7         exec.c expand.c \
8         histedit.c input.c jobs.c kill.c mail.c main.c memalloc.c miscbltin.c \
9         mystring.c options.c output.c parser.c printf.c redir.c show.c \
10         test.c trap.c var.c
11 GENSRCS= builtins.c nodes.c syntax.c
12 GENHDRS= builtins.h nodes.h syntax.h token.h
13 SRCS= ${SHSRCS} ${GENSRCS} ${GENHDRS}
14
15 # MLINKS for Shell built in commands for which there are no userland
16 # utilities of the same name are handled with the associated manpage,
17 # builtin.1 in share/man/man1/.
18
19 DPADD= ${LIBEDIT} ${LIBTERMCAP}
20 LDADD= -ledit -ltermcap
21
22 CFLAGS+=-DSHELL -I. -I${.CURDIR}
23 # for debug:
24 # DEBUG_FLAGS+= -g -DDEBUG=2 -fno-inline
25 WARNS?= 2
26 WFORMAT=0
27
28 .PATH:  ${.CURDIR}/bltin \
29         ${.CURDIR}/../kill \
30         ${.CURDIR}/../test \
31         ${.CURDIR}/../../usr.bin/printf
32
33 CLEANFILES+= mknodes mknodes.o \
34         mksyntax mksyntax.o
35 CLEANFILES+= ${GENSRCS} ${GENHDRS}
36
37 build-tools: mknodes mksyntax
38
39 .ORDER: builtins.c builtins.h
40 builtins.c builtins.h: mkbuiltins builtins.def
41         sh ${.CURDIR}/mkbuiltins ${.CURDIR}
42
43 # XXX this is just to stop the default .c rule being used, so that the
44 # intermediate object has a fixed name.
45 # XXX we have a default .c rule, but no default .o rule.
46 .o:
47         ${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET}
48 mknodes: mknodes.o
49 mksyntax: mksyntax.o
50
51 .ORDER: nodes.c nodes.h
52 nodes.c nodes.h: mknodes nodetypes nodes.c.pat
53         ./mknodes ${.CURDIR}/nodetypes ${.CURDIR}/nodes.c.pat
54
55 .ORDER: syntax.c syntax.h
56 syntax.c syntax.h: mksyntax
57         ./mksyntax
58
59 token.h: mktokens
60         sh ${.CURDIR}/mktokens
61
62 regress:
63         cd ${.CURDIR}/../../tools/regression/bin/sh && ${MAKE} SH=${.OBJDIR}/sh
64
65 .include <bsd.prog.mk>