1996-09-01 12:22:36 +02:00
|
|
|
# @(#)Makefile 8.4 (Berkeley) 5/5/95
|
1999-08-28 01:15:48 +02:00
|
|
|
# $FreeBSD$
|
1994-05-26 08:18:55 +02:00
|
|
|
|
2014-05-06 06:22:01 +02:00
|
|
|
.include <src.opts.mk>
|
2013-12-11 05:09:17 +01:00
|
|
|
|
2016-02-09 17:58:50 +01:00
|
|
|
PACKAGE=runtime
|
1994-05-26 08:18:55 +02:00
|
|
|
PROG= sh
|
2004-03-18 11:55:47 +01:00
|
|
|
INSTALLFLAGS= -S
|
2011-02-09 00:18:06 +01:00
|
|
|
SHSRCS= alias.c arith_yacc.c arith_yylex.c cd.c echo.c error.c eval.c \
|
|
|
|
exec.c expand.c \
|
2010-12-21 23:47:34 +01:00
|
|
|
histedit.c input.c jobs.c kill.c mail.c main.c memalloc.c miscbltin.c \
|
2010-11-19 13:56:13 +01:00
|
|
|
mystring.c options.c output.c parser.c printf.c redir.c show.c \
|
2001-11-17 20:10:11 +01:00
|
|
|
test.c trap.c var.c
|
2013-07-25 17:08:41 +02:00
|
|
|
GENSRCS= builtins.c nodes.c syntax.c
|
2004-01-20 14:13:40 +01:00
|
|
|
GENHDRS= builtins.h nodes.h syntax.h token.h
|
2011-02-09 00:18:06 +01:00
|
|
|
SRCS= ${SHSRCS} ${GENSRCS} ${GENHDRS}
|
1996-09-01 12:22:36 +02:00
|
|
|
|
1999-09-08 17:40:46 +02:00
|
|
|
# MLINKS for Shell built in commands for which there are no userland
|
|
|
|
# utilities of the same name are handled with the associated manpage,
|
2006-04-17 19:55:11 +02:00
|
|
|
# builtin.1 in share/man/man1/.
|
1999-09-08 17:40:46 +02:00
|
|
|
|
2014-11-25 12:15:40 +01:00
|
|
|
LIBADD= edit
|
1996-09-01 12:22:36 +02:00
|
|
|
|
1994-05-26 08:18:55 +02:00
|
|
|
CFLAGS+=-DSHELL -I. -I${.CURDIR}
|
1996-09-01 12:27:49 +02:00
|
|
|
# for debug:
|
2010-10-14 00:18:03 +02:00
|
|
|
# DEBUG_FLAGS+= -g -DDEBUG=2 -fno-inline
|
2007-11-18 02:53:07 +01:00
|
|
|
WARNS?= 2
|
2003-05-02 08:24:51 +02:00
|
|
|
WFORMAT=0
|
1996-09-01 12:22:36 +02:00
|
|
|
|
2001-11-17 20:10:11 +01:00
|
|
|
.PATH: ${.CURDIR}/bltin \
|
2017-03-04 12:31:08 +01:00
|
|
|
${.CURDIR:H}/kill \
|
|
|
|
${.CURDIR:H}/test \
|
|
|
|
${SRCTOP}/usr.bin/printf
|
1994-05-26 08:18:55 +02:00
|
|
|
|
2013-07-25 17:08:41 +02:00
|
|
|
CLEANFILES+= mknodes mknodes.o \
|
1998-05-06 17:33:59 +02:00
|
|
|
mksyntax mksyntax.o
|
1997-10-05 11:40:24 +02:00
|
|
|
CLEANFILES+= ${GENSRCS} ${GENHDRS}
|
1994-05-26 08:18:55 +02:00
|
|
|
|
2013-07-25 17:08:41 +02:00
|
|
|
build-tools: mknodes mksyntax
|
1998-07-07 03:06:58 +02:00
|
|
|
|
1997-10-05 11:40:24 +02:00
|
|
|
.ORDER: builtins.c builtins.h
|
2016-06-03 21:25:41 +02:00
|
|
|
builtins.h: .NOMETA
|
1997-05-19 02:16:27 +02:00
|
|
|
builtins.c builtins.h: mkbuiltins builtins.def
|
2012-05-24 21:48:15 +02:00
|
|
|
sh ${.CURDIR}/mkbuiltins ${.CURDIR}
|
1994-05-26 08:18:55 +02:00
|
|
|
|
1997-08-25 21:50:01 +02:00
|
|
|
# XXX this is just to stop the default .c rule being used, so that the
|
|
|
|
# intermediate object has a fixed name.
|
|
|
|
# XXX we have a default .c rule, but no default .o rule.
|
2016-04-14 23:06:10 +02:00
|
|
|
mknodes.o mksyntax.o: ${BUILD_TOOLS_META}
|
1997-08-25 21:50:01 +02:00
|
|
|
${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET}
|
2016-04-14 23:06:10 +02:00
|
|
|
mknodes: mknodes.o ${BUILD_TOOLS_META}
|
|
|
|
mksyntax: mksyntax.o ${BUILD_TOOLS_META}
|
1997-08-25 21:50:01 +02:00
|
|
|
|
1997-10-05 11:40:24 +02:00
|
|
|
.ORDER: nodes.c nodes.h
|
2016-06-03 21:25:41 +02:00
|
|
|
nodes.h: .NOMETA
|
1996-09-01 12:22:36 +02:00
|
|
|
nodes.c nodes.h: mknodes nodetypes nodes.c.pat
|
2016-05-10 00:21:09 +02:00
|
|
|
${BTOOLSPATH:U.}/mknodes ${.CURDIR}/nodetypes ${.CURDIR}/nodes.c.pat
|
1994-05-26 08:18:55 +02:00
|
|
|
|
1997-10-05 11:40:24 +02:00
|
|
|
.ORDER: syntax.c syntax.h
|
2016-06-03 21:25:41 +02:00
|
|
|
syntax.h: .NOMETA
|
1994-05-26 08:18:55 +02:00
|
|
|
syntax.c syntax.h: mksyntax
|
2016-05-10 00:21:09 +02:00
|
|
|
${BTOOLSPATH:U.}/mksyntax
|
1994-05-26 08:18:55 +02:00
|
|
|
|
1997-05-19 02:16:27 +02:00
|
|
|
token.h: mktokens
|
|
|
|
sh ${.CURDIR}/mktokens
|
1994-05-26 08:18:55 +02:00
|
|
|
|
2017-08-02 10:14:06 +02:00
|
|
|
HAS_TESTS=
|
2017-08-02 10:35:51 +02:00
|
|
|
SUBDIR.${MK_TESTS}+= tests
|
2010-10-12 20:20:38 +02:00
|
|
|
|
1997-05-19 02:16:27 +02:00
|
|
|
.include <bsd.prog.mk>
|