11 |
|
|
12 |
HOST_EXTRACFLAGS := $(config-cppflags) |
HOST_EXTRACFLAGS := $(config-cppflags) |
13 |
|
|
14 |
init-o-files := alias.o arith_yylex.o cd.o error.o eval.o exec.o expand.o \ |
init-o-files := alias.o arith_yacc.o arith_yylex.o cd.o error.o eval.o exec.o expand.o \ |
15 |
histedit.o input.o jobs.o mail.o main.o memalloc.o miscbltin.o \ |
histedit.o input.o jobs.o mail.o main.o memalloc.o miscbltin.o \ |
16 |
mystring.o options.o parser.o redir.o show.o trap.o output.o \ |
mystring.o options.o parser.o redir.o show.o trap.o output.o \ |
17 |
bltin/printf.o system.o bltin/test.o var.o |
bltin/printf.o system.o bltin/test.o var.o |
18 |
|
|
19 |
gen-o-files := arith.o builtins.o init.o nodes.o syntax.o |
gen-o-files := builtins.o init.o nodes.o syntax.o |
20 |
|
|
21 |
sh-y := $(init-o-files) $(gen-o-files) |
sh-y := $(init-o-files) $(gen-o-files) |
22 |
|
|
23 |
hostprogs-y := mkinit mksyntax mknodes mksignames |
hostprogs-y := mkinit mksyntax mknodes mksignames |
24 |
gen-h-files := arith.h builtins.h nodes.h syntax.h token.h |
gen-h-files := builtins.h nodes.h syntax.h token.h |
25 |
|
|
26 |
static-y := sh |
static-y := sh |
27 |
|
|
92 |
$(obj)/syntax.h: $(obj)/syntax.c |
$(obj)/syntax.h: $(obj)/syntax.c |
93 |
$(Q): |
$(Q): |
94 |
|
|
|
# Generate arith parser - arith{.c + .h} |
|
|
targets += arith.c arith.h |
|
|
# Prefer bison, but BSD yacc should work as well |
|
|
YACC ?= bison |
|
|
|
|
|
quiet_cmd_yacc = YACC $@ |
|
|
cmd_yacc = $(YACC) -d -o $(@:.h=.c) $< |
|
|
|
|
|
$(obj)/arith.h: $(src)/arith.y |
|
|
$(call if_changed,yacc) |
|
|
|
|
|
# side effect.. |
|
|
$(obj)/arith.c: $(obj)/arith.h |
|
|
$(Q): |
|
|
|
|
95 |
# Targets to install |
# Targets to install |
96 |
install-y := sh.shared |
install-y := sh.shared |