Deleted Added
full compact
Makefile (275028) Makefile (297997)
1# @(#)Makefile 8.4 (Berkeley) 5/5/95
1# @(#)Makefile 8.4 (Berkeley) 5/5/95
2# $FreeBSD: head/bin/sh/Makefile 275028 2014-11-25 11:15:40Z bapt $
2# $FreeBSD: head/bin/sh/Makefile 297997 2016-04-14 21:06:10Z bdrewery $
3
4.include <src.opts.mk>
5
6PROG= sh
7INSTALLFLAGS= -S
8SHSRCS= alias.c arith_yacc.c arith_yylex.c cd.c echo.c error.c eval.c \
9 exec.c expand.c \
10 histedit.c input.c jobs.c kill.c mail.c main.c memalloc.c miscbltin.c \
11 mystring.c options.c output.c parser.c printf.c redir.c show.c \
12 test.c trap.c var.c
13GENSRCS= builtins.c nodes.c syntax.c
14GENHDRS= builtins.h nodes.h syntax.h token.h
15SRCS= ${SHSRCS} ${GENSRCS} ${GENHDRS}
16
17# MLINKS for Shell built in commands for which there are no userland
18# utilities of the same name are handled with the associated manpage,
19# builtin.1 in share/man/man1/.
20
21LIBADD= edit
22
23CFLAGS+=-DSHELL -I. -I${.CURDIR}
24# for debug:
25# DEBUG_FLAGS+= -g -DDEBUG=2 -fno-inline
26WARNS?= 2
27WFORMAT=0
28
29.PATH: ${.CURDIR}/bltin \
30 ${.CURDIR}/../kill \
31 ${.CURDIR}/../test \
32 ${.CURDIR}/../../usr.bin/printf
33
34CLEANFILES+= mknodes mknodes.o \
35 mksyntax mksyntax.o
36CLEANFILES+= ${GENSRCS} ${GENHDRS}
37
38build-tools: mknodes mksyntax
39
40.ORDER: builtins.c builtins.h
41builtins.c builtins.h: mkbuiltins builtins.def
42 sh ${.CURDIR}/mkbuiltins ${.CURDIR}
43
44# XXX this is just to stop the default .c rule being used, so that the
45# intermediate object has a fixed name.
46# XXX we have a default .c rule, but no default .o rule.
3
4.include <src.opts.mk>
5
6PROG= sh
7INSTALLFLAGS= -S
8SHSRCS= alias.c arith_yacc.c arith_yylex.c cd.c echo.c error.c eval.c \
9 exec.c expand.c \
10 histedit.c input.c jobs.c kill.c mail.c main.c memalloc.c miscbltin.c \
11 mystring.c options.c output.c parser.c printf.c redir.c show.c \
12 test.c trap.c var.c
13GENSRCS= builtins.c nodes.c syntax.c
14GENHDRS= builtins.h nodes.h syntax.h token.h
15SRCS= ${SHSRCS} ${GENSRCS} ${GENHDRS}
16
17# MLINKS for Shell built in commands for which there are no userland
18# utilities of the same name are handled with the associated manpage,
19# builtin.1 in share/man/man1/.
20
21LIBADD= edit
22
23CFLAGS+=-DSHELL -I. -I${.CURDIR}
24# for debug:
25# DEBUG_FLAGS+= -g -DDEBUG=2 -fno-inline
26WARNS?= 2
27WFORMAT=0
28
29.PATH: ${.CURDIR}/bltin \
30 ${.CURDIR}/../kill \
31 ${.CURDIR}/../test \
32 ${.CURDIR}/../../usr.bin/printf
33
34CLEANFILES+= mknodes mknodes.o \
35 mksyntax mksyntax.o
36CLEANFILES+= ${GENSRCS} ${GENHDRS}
37
38build-tools: mknodes mksyntax
39
40.ORDER: builtins.c builtins.h
41builtins.c builtins.h: mkbuiltins builtins.def
42 sh ${.CURDIR}/mkbuiltins ${.CURDIR}
43
44# XXX this is just to stop the default .c rule being used, so that the
45# intermediate object has a fixed name.
46# XXX we have a default .c rule, but no default .o rule.
47.o:
47mknodes.o mksyntax.o: ${BUILD_TOOLS_META}
48 ${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET}
48 ${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET}
49mknodes: mknodes.o
50mksyntax: mksyntax.o
49mknodes: mknodes.o ${BUILD_TOOLS_META}
50mksyntax: mksyntax.o ${BUILD_TOOLS_META}
51
52.ORDER: nodes.c nodes.h
53nodes.c nodes.h: mknodes nodetypes nodes.c.pat
54 ./mknodes ${.CURDIR}/nodetypes ${.CURDIR}/nodes.c.pat
55
56.ORDER: syntax.c syntax.h
57syntax.c syntax.h: mksyntax
58 ./mksyntax
59
60token.h: mktokens
61 sh ${.CURDIR}/mktokens
62
63.if ${MK_TESTS} != "no"
64SUBDIR+= tests
65.endif
66
67.include <bsd.prog.mk>
51
52.ORDER: nodes.c nodes.h
53nodes.c nodes.h: mknodes nodetypes nodes.c.pat
54 ./mknodes ${.CURDIR}/nodetypes ${.CURDIR}/nodes.c.pat
55
56.ORDER: syntax.c syntax.h
57syntax.c syntax.h: mksyntax
58 ./mksyntax
59
60token.h: mktokens
61 sh ${.CURDIR}/mktokens
62
63.if ${MK_TESTS} != "no"
64SUBDIR+= tests
65.endif
66
67.include <bsd.prog.mk>