2005-04-21 16:53:53 +02:00
|
|
|
# Makefile for ash.
|
|
|
|
|
2010-05-12 18:28:54 +02:00
|
|
|
.include <minix.own.mk>
|
|
|
|
|
|
|
|
YHEADER=1
|
|
|
|
PROG= sh
|
|
|
|
|
|
|
|
SHSRCS= alias.c arith.y arith_lex.l 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 output.c parser.c redir.c show.c \
|
|
|
|
trap.c var.c setmode.c expr.c regexp.c
|
|
|
|
GENSRCS= builtins.c init.c nodes.c syntax.c operators.c signames.c
|
|
|
|
GENHDRS= builtins.h nodes.h syntax.h token.h operators.h signames.h
|
|
|
|
SRCS= ${SHSRCS} ${GENSRCS}
|
|
|
|
DPSRCS+=${GENHDRS}
|
|
|
|
BINDIR= /bin
|
|
|
|
MAN=
|
|
|
|
|
|
|
|
DPADD+= ${LIBL} ${LIBEDIT}
|
|
|
|
LDADD+= -ll -ledit
|
|
|
|
|
|
|
|
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
|
2006-05-23 14:59:34 +02:00
|
|
|
|
|
|
|
# Enable this line to disable command line editing
|
|
|
|
#EDIT=-DNO_HISTORY
|
|
|
|
# Enable this line to use the editline library instead of libedit
|
|
|
|
EDIT=-DEDITLINE
|
|
|
|
|
|
|
|
# Enable this line if your system does not have a <paths.h>
|
|
|
|
NO_PATHS_H=-DNO_PATHS_H
|
|
|
|
|
|
|
|
# Enable this if you don't want job control
|
|
|
|
NO_JOBS=-DJOBS=0
|
|
|
|
MKB_NO_JOBS=-j
|
|
|
|
|
2010-05-12 18:28:54 +02:00
|
|
|
CPPFLAGS+=-DSHELL -I. -I${.CURDIR}
|
|
|
|
CPPFLAGS+=${EDIT} ${NO_PATHS_H} ${NO_JOBS}
|
2005-04-21 16:53:53 +02:00
|
|
|
|
2010-05-12 18:28:54 +02:00
|
|
|
.PATH: ${.CURDIR}/bltin
|
2005-04-21 16:53:53 +02:00
|
|
|
|
2010-05-12 18:28:54 +02:00
|
|
|
CLEANFILES+= mkinit mkinit.o mknodes mknodes.o \
|
|
|
|
mksyntax mksyntax.o mksignames mksignames.o
|
|
|
|
CLEANFILES+= ${GENSRCS} ${GENHDRS} y.tab.h
|
2005-09-01 17:23:28 +02:00
|
|
|
|
2010-05-12 18:28:54 +02:00
|
|
|
build-tools: mkinit mknodes mksyntax mksignames
|
2005-04-21 16:53:53 +02:00
|
|
|
|
2010-05-12 18:28:54 +02:00
|
|
|
.ORDER: builtins.c builtins.h
|
|
|
|
builtins.c builtins.h: mkbuiltins builtins.def shell.h
|
|
|
|
cd ${.CURDIR}; sh mkbuiltins ${MKB_NO_JOBS} ${.OBJDIR} shell.h builtins.def
|
2005-04-21 16:53:53 +02:00
|
|
|
|
2010-05-12 18:28:54 +02:00
|
|
|
init.c: mkinit alias.c eval.c exec.c input.c jobs.c options.c parser.c \
|
|
|
|
redir.c trap.c var.c
|
|
|
|
./mkinit ${.ALLSRC:S/^mkinit$//}
|
2005-04-21 16:53:53 +02:00
|
|
|
|
2010-05-12 18:28:54 +02:00
|
|
|
mkinit: mkinit.o
|
|
|
|
mknodes: mknodes.o
|
|
|
|
mksyntax: mksyntax.o
|
|
|
|
mksignames: mksignames.o
|
2005-04-21 16:53:53 +02:00
|
|
|
|
2010-05-12 18:28:54 +02:00
|
|
|
.ORDER: nodes.c nodes.h
|
2005-04-21 16:53:53 +02:00
|
|
|
nodes.c nodes.h: mknodes nodetypes nodes.c.pat
|
2010-05-12 18:28:54 +02:00
|
|
|
./mknodes ${.CURDIR}/nodetypes ${.CURDIR}/nodes.c.pat
|
2005-04-21 16:53:53 +02:00
|
|
|
|
2010-05-12 18:28:54 +02:00
|
|
|
.ORDER: syntax.c syntax.h
|
2005-04-21 16:53:53 +02:00
|
|
|
syntax.c syntax.h: mksyntax
|
|
|
|
./mksyntax
|
|
|
|
|
2010-05-12 18:28:54 +02:00
|
|
|
token.h: mktokens
|
|
|
|
sh ${.CURDIR}/mktokens
|
2005-04-21 16:53:53 +02:00
|
|
|
|
2010-05-12 18:28:54 +02:00
|
|
|
.ORDER: signames.c signames.h
|
|
|
|
signames.c signames.h: mksignames
|
|
|
|
./mksignames
|
2010-02-16 15:41:33 +01:00
|
|
|
|
2010-05-12 18:28:54 +02:00
|
|
|
.ORDER: operators.c operators.h
|
|
|
|
operators.c operators.h: mkexpr unary_op binary_op
|
|
|
|
sh bltin/mkexpr bltin/unary_op bltin/binary_op
|
2005-04-21 16:53:53 +02:00
|
|
|
|
2010-05-12 18:28:54 +02:00
|
|
|
arith.h: arith.c
|
|
|
|
arith.c: arith.y
|
2006-05-23 14:59:34 +02:00
|
|
|
|
2010-05-12 18:28:54 +02:00
|
|
|
.include <minix.prog.mk>
|