Makefile revision 299289
117987Speter#	@(#)Makefile	8.4 (Berkeley) 5/5/95
250471Speter# $FreeBSD: head/bin/sh/Makefile 299289 2016-05-09 22:21:09Z bdrewery $
31556Srgrimes
4265420Simp.include <src.opts.mk>
5259210Sjmmv
6298107SgjbPACKAGE=runtime
71556SrgrimesPROG=	sh
8127167SruINSTALLFLAGS= -S
9218466SjillesSHSRCS=	alias.c arith_yacc.c arith_yylex.c cd.c echo.c error.c eval.c \
10218466Sjilles	exec.c expand.c \
11216629Sjilles	histedit.c input.c jobs.c kill.c mail.c main.c memalloc.c miscbltin.c \
12215520Sjilles	mystring.c options.c output.c parser.c printf.c redir.c show.c \
1386505Sknu	test.c trap.c var.c
14253650SjillesGENSRCS= builtins.c nodes.c syntax.c
15124751SruGENHDRS= builtins.h nodes.h syntax.h token.h
16218466SjillesSRCS= ${SHSRCS} ${GENSRCS} ${GENHDRS}
1717987Speter
1851090Ssheldonh# MLINKS for Shell built in commands for which there are no userland
1951090Ssheldonh# utilities of the same name are handled with the associated manpage,
20157811Sschweikh# builtin.1 in share/man/man1/.
2151090Ssheldonh
22275028SbaptLIBADD=	edit
2317987Speter
241556SrgrimesCFLAGS+=-DSHELL -I. -I${.CURDIR}
2517988Speter# for debug:
26213811Sobrien# DEBUG_FLAGS+= -g -DDEBUG=2 -fno-inline
27173718SjbWARNS?=	2
28114500SobrienWFORMAT=0
2917987Speter
3086505Sknu.PATH:	${.CURDIR}/bltin \
31216629Sjilles	${.CURDIR}/../kill \
32215520Sjilles	${.CURDIR}/../test \
33215520Sjilles	${.CURDIR}/../../usr.bin/printf
341556Srgrimes
35253650SjillesCLEANFILES+= mknodes mknodes.o \
3635783Sbde	mksyntax mksyntax.o
3730113SjkhCLEANFILES+= ${GENSRCS} ${GENHDRS}
381556Srgrimes
39253650Sjillesbuild-tools: mknodes mksyntax
4037456Sbde
4130113Sjkh.ORDER: builtins.c builtins.h
4225903Sstevebuiltins.c builtins.h: mkbuiltins builtins.def
43235927Smarcel	sh ${.CURDIR}/mkbuiltins ${.CURDIR}
441556Srgrimes
4528729Sbde# XXX this is just to stop the default .c rule being used, so that the
4628729Sbde# intermediate object has a fixed name.
4728729Sbde# XXX we have a default .c rule, but no default .o rule.
48297997Sbdrewerymknodes.o mksyntax.o: ${BUILD_TOOLS_META}
4928729Sbde	${CC} ${CFLAGS} ${LDFLAGS} ${.IMPSRC} ${LDLIBS} -o ${.TARGET}
50297997Sbdrewerymknodes: mknodes.o ${BUILD_TOOLS_META}
51297997Sbdrewerymksyntax: mksyntax.o ${BUILD_TOOLS_META}
5228729Sbde
5330113Sjkh.ORDER: nodes.c nodes.h
5417987Speternodes.c nodes.h: mknodes nodetypes nodes.c.pat
55299289Sbdrewery	${BTOOLSPATH:U.}/mknodes ${.CURDIR}/nodetypes ${.CURDIR}/nodes.c.pat
561556Srgrimes
5730113Sjkh.ORDER: syntax.c syntax.h
581556Srgrimessyntax.c syntax.h: mksyntax
59299289Sbdrewery	${BTOOLSPATH:U.}/mksyntax
601556Srgrimes
6125903Sstevetoken.h: mktokens
6225903Ssteve	sh ${.CURDIR}/mktokens
631556Srgrimes
64259210Sjmmv.if ${MK_TESTS} != "no"
65259210SjmmvSUBDIR+=    tests
66259210Sjmmv.endif
67213738Sobrien
681556Srgrimes.include <bsd.prog.mk>
69