9 # Enable this line to disable command line editing
12 # Enable this line if your system does not have a <paths.h>
13 #NO_PATHS_H=-DNO_PATHS_H
15 # Enable this if you don't want job control
19 SRCS
= alias.c arith.y arith_lex.l cd.c complete.c eval.c exec.c expand.c \
20 histedit.c input.c jobs.c mail.c main.c memalloc.c miscbltin.c \
21 mystring.c options.c output.c parser.c redir.c show.c \
22 trap.c var.c setmode.c
24 .
include "${.CURDIR}/bltin/Makefile.inc"
26 GENSRCS
= builtins.c init.c nodes.c syntax.c operators.c signames.c
27 GENHDRS
= builtins.h nodes.h syntax.h token.h operators.h signames.h
31 CLEANFILES
+=${GENSRCS} ${GENHDRS}
33 DPADD
+= ${LIBL} ${LIBEDIT}
36 CPPFLAGS
+= -DSHELL
-D__NBSD_LIBC
37 CPPFLAGS
+=${EDIT} ${NO_PATHS_H} ${NO_JOBS}
39 CPPFLAGS
+= -I.
-I
${.CURDIR
}
41 # A. Generate C tools used to build ash
42 .for tool in init nodes signames syntax
43 ${.OBJDIR
}/mk
${tool}: ${.CURDIR
}/mk
${tool}.c
44 ${HOST_CC} ${.ALLSRC
} -o
${.TARGET
}
47 # B. Generates C sources from C tools
48 NODES_ARGS
:= ${.CURDIR
}/nodetypes
${.CURDIR
}/nodes.c.pat
49 INIT_ARGS
:= alias.c eval.c exec.c input.c jobs.c options.c parser.c \
52 .for tool in nodes signames syntax
53 ${tool}.c
${tool}.h
: ${.OBJDIR
}/mk
${tool}
54 ${.OBJDIR
}/mk
${tool} ${${tool
:tu
}_ARGS
}
57 init.c
: ${.OBJDIR
}/mkinit \
58 alias.c eval.c exec.c input.c jobs.c options.c parser.c \
60 ${.OBJDIR
}/mkinit
${.ALLSRC
:S
,^
${.OBJDIR
}/mkinit
$,,}
62 # C. Generates C sources from shell scripts
64 ${.CURDIR
}/mktokens.sh
66 builtins.c builtins.h
:
67 ${.CURDIR
}/mkbuiltins.sh
${MKB_NO_JOBS} .
${.CURDIR
}/shell.h
${.CURDIR
}/builtins.def
69 operators.c operators.h
:
70 ${.CURDIR
}/bltin
/mkexpr.sh
${.CURDIR
}/bltin
/unary_op
${.CURDIR
}/bltin
/binary_op
72 # D. Generates sources from yacc/lex
73 LFLAGS
= -8 # 8-bit lex scanner for arithmetic
76 CLEANFILES
+= arith.h arith.y.o
83 # Explicit dependencies to ensure creation when needed
84 # LSC FIXME Under MINIX, the build system curiously needs more help.
85 # is it because of the missing order tools?
88 cd.c complete.c eval.c exec.c expand.c jobs.c main.c options.c parser.c redir.c show.c trap.c var.c
: nodes.h
89 eval.c exec.c expand.c input.c input.h jobs.c mystring.c output.c parser.c trap.c var.c
: syntax.h
90 cd.c eval.c exec.c histedit.cjobs.c main.c miscbltin.c options.c trap.c var.c
: builtins.h
92 # LSC: Seems that this file is implicitly taken into account by NetBSD's make,
93 # still seems to be ignored / not found currently.
94 # It's a sad story, as it has default rules to manage yacc / lex files. So for
95 # a happy ending here it is explicitly included:
98 .
include <bsd.prog.mk
>