[PATCH v2 06/30] Fix Makefile warning about parallel targets

Bin Meng bmeng.cn at gmail.com
Mon May 1 04:53:38 CEST 2023


Hi Simon,

On Sun, Apr 30, 2023 at 9:30 AM Simon Glass <sjg at chromium.org> wrote:
>
> These targets are not really parallel; they are handled one at a time
> when invoked by other rules. Some recent versions of make (e.g. on MSYS2)
> give a warning about this. Split out the rules to avoid the warning.

I did not see any warning without this patch.

Also it looks both MSYS2 and Ubuntu 22.04 has make v4.3 which doesn't
emit any warning.

>
> Signed-off-by: Simon Glass <sjg at chromium.org>
> ---
>
> (no changes since v1)
>
>  tools/Makefile | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/tools/Makefile b/tools/Makefile
> index 38699b069d63..22ae5c30351f 100644
> --- a/tools/Makefile
> +++ b/tools/Makefile
> @@ -263,7 +263,16 @@ HOSTCFLAGS_sha512.o := -pedantic -DCONFIG_SHA512 -DCONFIG_SHA384
>  quiet_cmd_wrap = WRAP    $@
>  cmd_wrap = echo "\#include <../$(patsubst $(obj)/%,%,$@)>" >$@
>
> -$(obj)/boot/%.c $(obj)/common/%.c $(obj)/env/%.c $(obj)/lib/%.c:
> +$(obj)/boot/%.c:
> +       $(call cmd,wrap)
> +
> +$(obj)/common/%.c:
> +       $(call cmd,wrap)
> +
> +$(obj)/env/%.c:
> +       $(call cmd,wrap)
> +
> +$(obj)/lib/%.c:
>         $(call cmd,wrap)
>
>  clean-dirs := lib common
> --

Regards,
Bin


More information about the U-Boot mailing list