diff options
author | Masahiro Yamada <masahiroy@kernel.org> | 2020-04-15 16:57:04 +0900 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2020-04-15 11:28:27 +0200 |
commit | f7eda6657c01c6e34e8aa66ea3a8cdb4024dec0b (patch) | |
tree | dc85e37deb904c0fe8c1fe37d2938d1cd2e33a09 /scripts | |
parent | 421108c51da4d6c33fe06fe99db3390fcaa25c66 (diff) | |
download | barebox-f7eda6657c01c6e34e8aa66ea3a8cdb4024dec0b.tar.gz barebox-f7eda6657c01c6e34e8aa66ea3a8cdb4024dec0b.tar.xz |
kbuild: update flex and bison rules to Linux 5.7-rc1
Import the following commits from Linux, and re-sync.
- 6ba7dc6616ce
"kbuild: make bison create C file and header in a single pattern rule"
- cf8dfd15e5fb
"kbuild: move flex and bison rules to Makefile.host"
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Makefile.host | 20 | ||||
-rw-r--r-- | scripts/Makefile.lib | 22 |
2 files changed, 19 insertions, 23 deletions
diff --git a/scripts/Makefile.host b/scripts/Makefile.host index 61f0a77146..8f4d62f22e 100644 --- a/scripts/Makefile.host +++ b/scripts/Makefile.host @@ -1,3 +1,21 @@ +# SPDX-License-Identifier: GPL-2.0 + +# LEX +# --------------------------------------------------------------------------- +quiet_cmd_flex = LEX $@ + cmd_flex = $(LEX) -o$@ -L $< + +$(obj)/%.lex.c: $(src)/%.l FORCE + $(call if_changed,flex) + +# YACC +# --------------------------------------------------------------------------- +quiet_cmd_bison = YACC $(basename $@).[ch] + cmd_bison = $(YACC) -o $(basename $@).c --defines=$(basename $@).h -t -l $< + +$(obj)/%.tab.c $(obj)/%.tab.h: $(src)/%.y FORCE + $(call if_changed,bison) + # ========================================================================== # Building binaries on the host system # Binaries are used during the compilation of the kernel, for example @@ -5,7 +23,7 @@ # # Both C and C++ are supported, but preferred language is C for such utilities. # -# Sample syntax (see Documentation/kbuild/makefiles.txt for reference) +# Sample syntax (see Documentation/kbuild/makefiles.rst for reference) # hostprogs := bin2hex # Will compile bin2hex.c and create an executable named bin2hex # diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib index 2b64b5432b..d4c2ed15b6 100644 --- a/scripts/Makefile.lib +++ b/scripts/Makefile.lib @@ -195,28 +195,6 @@ $(foreach m, $(notdir $1), \ $(addprefix $(obj)/, $(foreach s, $3, $($(m:%$(strip $2)=%$(s))))))) endef -# LEX -# --------------------------------------------------------------------------- -quiet_cmd_flex = LEX $@ - cmd_flex = $(LEX) -o$@ -L $< - -$(obj)/%.lex.c: $(src)/%.l FORCE - $(call if_changed,flex) - -# YACC -# --------------------------------------------------------------------------- -quiet_cmd_bison = YACC $@ - cmd_bison = $(YACC) -o$@ -t -l $< - -$(obj)/%.tab.c: $(src)/%.y FORCE - $(call if_changed,bison) - -quiet_cmd_bison_h = YACC $@ - cmd_bison_h = $(YACC) -o/dev/null --defines=$@ -t -l $< - -$(obj)/%.tab.h: $(src)/%.y FORCE - $(call if_changed,bison_h) - # Shipped files # =========================================================================== |