130ab7336b
* Don't bother prefixing commands with a line of ${_MKCMD}\ and instead rely upon "make -s". This is less intrusive on all the Makefiles than the former. Idea from David Laight. * Rename the variables use to print messages. The scheme now is: _MKMSG_FOO Run _MKMSG 'foo' _MKTARGET_FOO Run _MKMSG_FOO ${.TARGET} From discussion with Alistair Crooks.
102 lines
2.2 KiB
Makefile
102 lines
2.2 KiB
Makefile
# $NetBSD: Makefile,v 1.72 2003/10/21 10:01:19 lukem 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
|
|
GENSRCS=arith.c arith_lex.c builtins.c init.c nodes.c syntax.c
|
|
GENHDRS=arith.h builtins.h nodes.h syntax.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
|
|
|
|
.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+= mkinit mknodes mksyntax
|
|
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 ${SHSRCS}
|
|
${_MKTARGET_CREATE}
|
|
./${.ALLSRC}
|
|
|
|
nodes.h: nodes.c
|
|
|
|
nodes.c: mknodes nodetypes nodes.c.pat
|
|
${_MKTARGET_CREATE}
|
|
./${.ALLSRC}
|
|
[ -f nodes.h ]
|
|
|
|
syntax.h: syntax.c
|
|
|
|
syntax.c: mksyntax
|
|
${_MKTARGET_CREATE}
|
|
./${.ALLSRC}
|
|
[ -f syntax.h ]
|
|
|
|
.if ${USETOOLS} == "yes"
|
|
COMPATOBJDIR!= cd ${NETBSDSRCDIR}/tools/compat && ${PRINTOBJDIR}
|
|
NBCOMPATLIB= -L${COMPATOBJDIR} -lnbcompat
|
|
.endif
|
|
|
|
mkinit: mkinit.c
|
|
${_MKTARGET_LINK}
|
|
${HOST_LINK.c} -o mkinit ${.IMPSRC} ${NBCOMPATLIB}
|
|
|
|
mknodes: mknodes.c
|
|
${_MKTARGET_LINK}
|
|
${HOST_LINK.c} -o mknodes ${.IMPSRC} ${NBCOMPATLIB}
|
|
|
|
.if (${MACHINE_ARCH} == "powerpc") || \
|
|
(${MACHINE_CPU} == "arm")
|
|
TARGET_CHARFLAG?= -DTARGET_CHAR="unsigned char"
|
|
.else
|
|
TARGET_CHARFLAG?= -DTARGET_CHAR="signed char"
|
|
.endif
|
|
|
|
mksyntax: mksyntax.c
|
|
${_MKTARGET_LINK}
|
|
${HOST_LINK.c} ${TARGET_CHARFLAG} -o mksyntax ${.IMPSRC} ${NBCOMPATLIB}
|
|
|
|
.include <bsd.prog.mk>
|