9 # Enable this line to disable command line editing
11 # Enable this line to use the editline library instead of libedit
14 # Enable this line if your system does not have a <paths.h>
15 #NO_PATHS_H=-DNO_PATHS_H
17 # Enable this if you don't want job control
21 SRCS
= alias.c arith.y arith_lex.l cd.c eval.c exec.c expand.c \
22 histedit.c input.c jobs.c mail.c main.c memalloc.c miscbltin.c \
23 mystring.c options.c output.c parser.c redir.c show.c \
24 trap.c var.c setmode.c
26 .
include "${.CURDIR}/bltin/Makefile.inc"
28 GENSRCS
= builtins.c init.c nodes.c syntax.c operators.c signames.c
29 GENHDRS
= builtins.h nodes.h syntax.h token.h operators.h signames.h
33 CLEANFILES
+=${GENSRCS} ${GENHDRS}
35 DPADD
+= ${LIBL} ${LIBEDIT}
38 CPPFLAGS
+= -DSHELL
-D__NBSD_LIBC
39 CPPFLAGS
+=${EDIT} ${NO_PATHS_H} ${NO_JOBS}
41 CPPFLAGS
+= -I.
-I
${.CURDIR
}
43 # A. Generate C tools used to build ash
44 .for tool in init nodes signames syntax
45 ${.OBJDIR
}/mk
${tool}: ${.CURDIR
}/mk
${tool}.c
46 ${HOST_CC} ${.ALLSRC
} -o
${.TARGET
}
49 # B. Generates C sources from C tools
50 NODES_ARGS
:= ${.CURDIR
}/nodetypes
${.CURDIR
}/nodes.c.pat
51 INIT_ARGS
:= alias.c eval.c exec.c input.c jobs.c options.c parser.c \
54 .for tool in nodes signames syntax
55 ${tool}.c
${tool}.h
: ${.OBJDIR
}/mk
${tool}
56 ${.OBJDIR
}/mk
${tool} ${${tool
:tu
}_ARGS
}
59 init.c
: ${.OBJDIR
}/mkinit \
60 alias.c eval.c exec.c input.c jobs.c options.c parser.c \
62 ${.OBJDIR
}/mkinit
${.ALLSRC
:S
,^
${.OBJDIR
}/mkinit
$,,}
64 # C. Generates C sources from shell scripts
66 ${.CURDIR
}/mktokens.sh
68 builtins.c builtins.h
:
69 ${.CURDIR
}/mkbuiltins.sh
${MKB_NO_JOBS} .
${.CURDIR
}/shell.h
${.CURDIR
}/builtins.def
71 operators.c operators.h
:
72 ${.CURDIR
}/bltin
/mkexpr.sh
${.CURDIR
}/bltin
/unary_op
${.CURDIR
}/bltin
/binary_op
74 # D. Generates sources from yacc/lex
75 LFLAGS
= -8 # 8-bit lex scanner for arithmetic
78 CLEANFILES
+= arith.h arith.y.o
85 # Explicit dependencies to ensure creation when needed
86 # LSC FIXME Under MINIX, the build system curiously needs more help.
87 # is it because of the missing order tools?
90 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
91 eval.c exec.c expand.c input.c input.h jobs.c mystring.c output.c parser.c trap.c var.c
: syntax.h
92 cd.c eval.c exec.c histedit.cjobs.c main.c miscbltin.c options.c trap.c var.c
: builtins.h
94 # LSC: Seems that this file is implicitly taken into account by NetBSD's make,
95 # still seems to be ignored / not found currently.
96 # It's a sad story, as it has default rules to manage yacc / lex files. So for
97 # a happy ending here it is explicitly included:
100 .
include <bsd.prog.mk
>