diff options
Diffstat (limited to 'scripts/Makefile.lib')
| -rw-r--r-- | scripts/Makefile.lib | 24 |
1 files changed, 3 insertions, 21 deletions
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 45b9aa3ca39e..b1d938fab73b 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib | |||
| @@ -184,14 +184,8 @@ endef | |||
| 184 | quiet_cmd_flex = LEX $@ | 184 | quiet_cmd_flex = LEX $@ |
| 185 | cmd_flex = $(LEX) -o$@ -L $< | 185 | cmd_flex = $(LEX) -o$@ -L $< |
| 186 | 186 | ||
| 187 | ifdef REGENERATE_PARSERS | ||
| 188 | .PRECIOUS: $(src)/%.lex.c_shipped | ||
| 189 | $(src)/%.lex.c_shipped: $(src)/%.l | ||
| 190 | $(call cmd,flex) | ||
| 191 | endif | ||
| 192 | |||
| 193 | .PRECIOUS: $(obj)/%.lex.c | 187 | .PRECIOUS: $(obj)/%.lex.c |
| 194 | $(filter %.lex.c,$(targets)): $(obj)/%.lex.c: $(src)/%.l FORCE | 188 | $(obj)/%.lex.c: $(src)/%.l FORCE |
| 195 | $(call if_changed,flex) | 189 | $(call if_changed,flex) |
| 196 | 190 | ||
| 197 | # YACC | 191 | # YACC |
| @@ -199,27 +193,15 @@ $(filter %.lex.c,$(targets)): $(obj)/%.lex.c: $(src)/%.l FORCE | |||
| 199 | quiet_cmd_bison = YACC $@ | 193 | quiet_cmd_bison = YACC $@ |
| 200 | cmd_bison = $(YACC) -o$@ -t -l $< | 194 | cmd_bison = $(YACC) -o$@ -t -l $< |
| 201 | 195 | ||
| 202 | ifdef REGENERATE_PARSERS | ||
| 203 | .PRECIOUS: $(src)/%.tab.c_shipped | ||
| 204 | $(src)/%.tab.c_shipped: $(src)/%.y | ||
| 205 | $(call cmd,bison) | ||
| 206 | endif | ||
| 207 | |||
| 208 | .PRECIOUS: $(obj)/%.tab.c | 196 | .PRECIOUS: $(obj)/%.tab.c |
| 209 | $(filter %.tab.c,$(targets)): $(obj)/%.tab.c: $(src)/%.y FORCE | 197 | $(obj)/%.tab.c: $(src)/%.y FORCE |
| 210 | $(call if_changed,bison) | 198 | $(call if_changed,bison) |
| 211 | 199 | ||
| 212 | quiet_cmd_bison_h = YACC $@ | 200 | quiet_cmd_bison_h = YACC $@ |
| 213 | cmd_bison_h = bison -o/dev/null --defines=$@ -t -l $< | 201 | cmd_bison_h = bison -o/dev/null --defines=$@ -t -l $< |
| 214 | 202 | ||
| 215 | ifdef REGENERATE_PARSERS | ||
| 216 | .PRECIOUS: $(src)/%.tab.h_shipped | ||
| 217 | $(src)/%.tab.h_shipped: $(src)/%.y | ||
| 218 | $(call cmd,bison_h) | ||
| 219 | endif | ||
| 220 | |||
| 221 | .PRECIOUS: $(obj)/%.tab.h | 203 | .PRECIOUS: $(obj)/%.tab.h |
| 222 | $(filter %.tab.h,$(targets)): $(obj)/%.tab.h: $(src)/%.y FORCE | 204 | $(obj)/%.tab.h: $(src)/%.y FORCE |
| 223 | $(call if_changed,bison_h) | 205 | $(call if_changed,bison_h) |
| 224 | 206 | ||
| 225 | # Shipped files | 207 | # Shipped files |
