X-Git-Url: https://git.librecmc.org/?a=blobdiff_plain;f=scripts%2FMakefile.build;h=482ed0c8d80482c8bbf81e7a46adbfd2c96c9e9a;hb=ff6bef48529b8c49cad74371cfaa3b2175146c30;hp=06e5c203c1f13bd4428ef16c2151e9345e07c0ef;hpb=45fe3809b9923b92f221d70eb45ae071059fd5e0;p=oweals%2Fu-boot.git diff --git a/scripts/Makefile.build b/scripts/Makefile.build index 06e5c203c1..482ed0c8d8 100644 --- a/scripts/Makefile.build +++ b/scripts/Makefile.build @@ -1,9 +1,7 @@ +# SPDX-License-Identifier: GPL-2.0 # ========================================================================== # Building # ========================================================================== -# -# SPDX-License-Identifier: GPL-2.0 -# # Modified for U-Boot prefix := tpl @@ -417,6 +415,17 @@ $(call multi_depend, $(multi-used-m), .o, -objs -y) targets += $(multi-used-y) $(multi-used-m) +# Add intermediate targets: +# When building objects with specific suffix patterns, add intermediate +# targets that the final targets are derived from. +intermediate_targets = $(foreach sfx, $(2), \ + $(patsubst %$(strip $(1)),%$(sfx), \ + $(filter %$(strip $(1)), $(targets)))) +# %.lex.o <- %.lex.c <- %.l +# %.tab.o <- %.tab.[ch] <- %.y +targets += $(call intermediate_targets, .lex.o, .lex.c) \ + $(call intermediate_targets, .tab.o, .tab.c .tab.h) + # Descending # ---------------------------------------------------------------------------