On Tuesday 11 October 2022 23:35:22 Masahiro Yamada wrote: > On Tue, Oct 11, 2022 at 11:16 PM Simon Glass <s...@chromium.org> wrote: > > > > This is required for if_changed to work correctly. Add it. > > > > Signed-off-by: Simon Glass <s...@chromium.org> > > Reviewed-by: Pali Rohár <p...@kernel.org> > > --- > > > > (no changes since v1) > > > > Makefile | 2 +- > > 1 file changed, 1 insertion(+), 1 deletion(-) > > > > diff --git a/Makefile b/Makefile > > index 3866cc62f9a..d28e8b4e316 100644 > > --- a/Makefile > > +++ b/Makefile > > @@ -1111,7 +1111,7 @@ endef > > PHONY += inputs > > inputs: $(INPUTS-y) > > > > -all: .binman_stamp inputs > > +all: .binman_stamp inputs FORCE > > ifeq ($(CONFIG_BINMAN),y) > > $(call if_changed,binman) > > > > 'all' is usually used as a phony target. > > > I think this went wrong. > > if_changed should never be used for a phony target. > In other words, if_changed should produce a build artifact. > > > > FORCE is never used for a phony target because > it is added to 'PHONY'. > > PHONY += all > >
I agree, this is really written in the wrong way. Target "all:" should be really phony target and should only depends on other target, it should not have any body / commands. And binman call should be moved to different non-phony target with the correct output file name. > > > > > endif > > -- > > 2.38.0.rc1.362.ged0d419d3c-goog > >