[PATCH v2 2/5] Makefile: Correct a missing FORCE on the binman rule

Masahiro Yamada yamada.masahiro at socionext.com
Tue Oct 11 16:35:22 CEST 2022


On Tue, Oct 11, 2022 at 11:16 PM Simon Glass <sjg at chromium.org> wrote:
>
> This is required for if_changed to work correctly. Add it.
>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> Reviewed-by: Pali Rohár <pali at 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






>  endif
> --
> 2.38.0.rc1.362.ged0d419d3c-goog
>


More information about the U-Boot mailing list