f0177aeba6
Kill mksyntax.c - no longer possible to get the 'wrong sort of chars'. /bin/sh now has no helper binaries. syntax.c uses C99 initialisers, run time initialisation could be used for systems where the compiler doesn't support them. I've used some #defines to help make this possible - but writing the code starts making it rather messy.
78 lines
1.7 KiB
Makefile
78 lines
1.7 KiB
Makefile
# $NetBSD: Makefile,v 1.77 2004/01/17 17:38:12 dsl Exp $
|
|
# @(#)Makefile 8.4 (Berkeley) 5/5/95
|
|
|
|
.include <bsd.own.mk>
|
|
|
|
YHEADER=1
|
|
PROG= sh
|
|
SHSRCS= alias.c cd.c echo.c error.c eval.c exec.c expand.c \
|
|
histedit.c input.c jobs.c mail.c main.c memalloc.c miscbltin.c \
|
|
mystring.c options.c parser.c redir.c show.c trap.c output.c var.c \
|
|
test.c printf.c kill.c syntax.c
|
|
GENSRCS=arith.c arith_lex.c builtins.c init.c nodes.c
|
|
GENHDRS=arith.h builtins.h nodes.h token.h
|
|
SRCS= ${SHSRCS} ${GENSRCS}
|
|
|
|
DPSRCS+=${GENHDRS}
|
|
|
|
LDADD+= -ll -ledit -ltermcap
|
|
DPADD+= ${LIBL} ${LIBEDIT} ${LIBTERMCAP}
|
|
|
|
LFLAGS= -8 # 8-bit lex scanner for arithmetic
|
|
YFLAGS= -d
|
|
|
|
# The .depend file can get references to these temporary files
|
|
.OPTIONAL: lex.yy.c y.tab.c
|
|
|
|
.ifdef CRUNCHEDPROG
|
|
LFLAGS+=-L
|
|
YFLAGS+=-l
|
|
.endif
|
|
|
|
CPPFLAGS+=-DSHELL -I. -I${.CURDIR}
|
|
#XXX: For testing only.
|
|
#CPPFLAGS+=-DDEBUG=1
|
|
#CFLAGS+=-funsigned-char
|
|
#TARGET_CHARFLAG?= -DTARGET_CHAR="unsigned char" -funsigned-char
|
|
|
|
.ifdef SMALLPROG
|
|
CPPFLAGS+=-DSMALL
|
|
.endif
|
|
|
|
.PATH: ${.CURDIR}/bltin ${NETBSDSRCDIR}/bin/test \
|
|
${NETBSDSRCDIR}/usr.bin/printf \
|
|
${NETBSDSRCDIR}/bin/kill
|
|
|
|
CLEANFILES+= ${GENSRCS} ${GENHDRS} y.tab.h
|
|
CLEANFILES+= trace
|
|
|
|
token.h: mktokens
|
|
${_MKTARGET_CREATE}
|
|
${HOST_SH} ${.ALLSRC}
|
|
|
|
builtins.h: builtins.c
|
|
${_MKTARGET_CREATE}
|
|
|
|
builtins.c: mkbuiltins shell.h builtins.def
|
|
${_MKTARGET_CREATE}
|
|
${HOST_SH} ${.ALLSRC} ${.OBJDIR}
|
|
[ -f builtins.h ]
|
|
|
|
init.c: mkinit.sh ${SHSRCS}
|
|
${_MKTARGET_CREATE}
|
|
${HOST_SH} ${.ALLSRC}
|
|
|
|
nodes.h: nodes.c
|
|
|
|
nodes.c: mknodes.sh nodetypes nodes.c.pat
|
|
${_MKTARGET_CREATE}
|
|
${HOST_SH} ${.ALLSRC} ${.OBJDIR}
|
|
[ -f nodes.h ]
|
|
|
|
.if ${USETOOLS} == "yes"
|
|
COMPATOBJDIR!= cd ${NETBSDSRCDIR}/tools/compat && ${PRINTOBJDIR}
|
|
NBCOMPATLIB= -L${COMPATOBJDIR} -lnbcompat
|
|
.endif
|
|
|
|
.include <bsd.prog.mk>
|