Changeset 2382 in kBuild for trunk/src/kash/Makefile.kmk
- Timestamp:
- Jan 13, 2010 10:41:05 PM (15 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/kash/Makefile.kmk
r2376 r2382 86 86 bltin/test.c \ 87 87 \ 88 $(PATH_kash)/arith.c \89 $(PATH_kash)/arith_lex.c \90 88 $(PATH_kash)/builtins.c \ 91 89 $(PATH_kash)/init.c \ … … 110 108 111 109 kash_INTERMEDIATES = \ 112 $(PATH_kash)/arith.h \113 110 $(PATH_kash)/builtins.h \ 114 111 $(PATH_kash)/nodes.h \ … … 116 113 kash_CLEAN = \ 117 114 $(kash_INTERMEDIATES) \ 118 $(PATH_kash)/arith.c \119 $(PATH_kash)/arith_lex.c \120 115 $(PATH_kash)/builtins.c \ 121 116 $(PATH_kash)/init.c \ … … 135 130 # Use the pregenerated code. 136 131 # 137 kash_INTERMEDIATES := 138 kash_INCS += generated 139 kash_SOURCES := $(patsubst $(PATH_kash)/%,generated/%,$(kash_SOURCES)) 132 kash_SOURCES += \ 133 $(kash_0_OUTDIR)/arith.c \ 134 $(kash_0_OUTDIR)/arith_lex.c 135 136 define def_copy_generated 137 $$(kash_0_OUTDIR)/$(src): $(PATH_SUB_CURRENT)/generated/$(src) 138 $$(RM) -f $$@ 139 $$(CP) -f $$^ $$@ 140 endef 141 142 $(foreach src, arith.h arith.c arith_lex.c builtins.h builtins.c nodes.h nodes.c token.h init.c,\ 143 $(eval $(def_copy_generated))) 140 144 141 145 else 146 147 # 148 # Generate the code on the fly. 149 # 150 151 USES += lex yacc 152 kash_USES = lex yacc 153 kash_LEXTOOL = FLEX 154 kash_LEXFLAGS = -8 155 #kash_YACCTOOL = BISON 156 kash_YACCTOOL = YACC 157 kash_YACCFLAGS = -ld 158 kash_SOURCES += \ 159 arith.y \ 160 arith_lex.l 142 161 143 162 # … … 150 169 # 151 170 BOOTSTRAP_SHELL ?= $(SHELL) 152 ifndef YACC153 YACC := $(firstword $(which byacc) $(which yacc) yacc)154 endif155 156 $$(PATH_kash)/arith.h + $$(PATH_kash)/arith.c: arith.y | $$(dir $$@)157 $(YACC) -ld $^158 $(MV) -f y.tab.c $(PATH_kash)/arith.c159 $(MV) -f y.tab.h $(PATH_kash)/arith.h160 161 $$(PATH_kash)/arith_lex.c: $$(kash_DEFPATH)/arith_lex.l | $$(dir $$@)162 flex -8 -o$@ $^ # 8-bit lex scanner for arithmetic163 171 164 172 $$(PATH_kash)/builtins.h + $$(PATH_kash)/builtins.c: \
Note:
See TracChangeset
for help on using the changeset viewer.