History

kbuild: move flex and bison rules to Makefile.host

Flex and bison are used for kconfig, dtc, genksyms, all of which are host programs. I never imagine the kernel embeds a parser or a lexer. Move the flex and bison rules to scripts/Makefile.host. This file is included only when hostprogs-y etc. is present in the Makefile in the directory. So, parsing these rules are skipped in most of directories.

Masahiro Yamada committed 7 years ago

Commit cf8dfd11 parent 6ba7dc62 files · +17 −16Browse files

Showing the changes to scripts/Makefile.lib (1 of 2 files). Show all

Unified · Split

scripts/Makefile.lib+0−16
@@ -187,22 +187,6 @@ $(foreach m, $(notdir $1), \ · 186 unmodified lines
187 $(addprefix $(obj)/, $(foreach s, $3, $($(m:%$(strip $2)=%$(s)))))))187 $(addprefix $(obj)/, $(foreach s, $3, $($(m:%$(strip $2)=%$(s)))))))
188endef188endef
189 189
190# LEX
191# ---------------------------------------------------------------------------
192quiet_cmd_flex = LEX $@
193 cmd_flex = $(LEX) -o$@ -L $<
194
195$(obj)/%.lex.c: $(src)/%.l FORCE
196 $(call if_changed,flex)
197
198# YACC
199# ---------------------------------------------------------------------------
200quiet_cmd_bison = YACC $(basename $@).[ch]
201 cmd_bison = $(YACC) -o $(basename $@).c --defines=$(basename $@).h -t -l $<
202
203$(obj)/%.tab.c $(obj)/%.tab.h: $(src)/%.y FORCE
204 $(call if_changed,bison)
205
206# Shipped files190# Shipped files
207# ===========================================================================191# ===========================================================================
208 192

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t