[RFC PATCH] Kbuild: Always use $(PHASE_)
Simon Glass
sjg at chromium.org
Wed Mar 5 15:15:50 CET 2025
Hi Tom,
On Tue, 4 Mar 2025 at 13:41, Tom Rini <trini at konsulko.com> wrote:
>
> It is confusing to have both "$(PHASE_)" and "$(XPL_)" be used in our
> Makefiles as part of the macros to determine when to do something in our
> Makefiles based on what phase of the build we are in. For consistency,
> bring this down to a single macro and use "$(PHASE_)" only.
>
> Signed-off-by: Tom Rini <trini at konsulko.com>
> ---
> Cc: Simon Glass <sjg at chromium.org>
>
> This leads a little bit of dead code in scripts/Makefile.xpl that I
> didn't remove as this is an RFC. This also omits expanding on our build
> documentation slightly.
>
> With the following patches applied (which are correct regardless of this
> RFC and so separate):
> https://patchwork.ozlabs.org/project/uboot/patch/20250304203235.2834031-1-trini@konsulko.com/
> https://patchwork.ozlabs.org/project/uboot/patch/20250304202436.2783784-1-trini@konsulko.com/
>
> There's no change in the resulting build before/after this patch.
>
> We could do the other direction and drop $(PHASE_) in favour of $(XPL_)
> but that would require updating the logic of how XPL_ is defined.
These are not the same thing at present:
XPL_ refers to any xPL phase
PHASE_ refers to a particular xPL phase
Since it doesn't change the build, it must be fine. It's just surprising, to me.
Regards,
Simon
More information about the U-Boot
mailing list