fix: use strip() when comparing PLATFORM_DEFS to avoid spurious rebuilds

PLATFORM_DEFS is built with += on an initially empty variable, which
produces a leading space in GNU make. The cached value written to
.Makefile.options.cache has no leading space, so the ifneq comparison
always evaluates to true, causing PLATFORM_CHANGED=true on every
invocation and triggering a clean of bootrom/armsrc/recovery after
every build.
This commit is contained in:
Sujit Konapur
2026-03-09 23:26:45 -07:00
parent d27885cf43
commit 0577f6f321

View File

@@ -306,7 +306,7 @@ ifneq ($(PLATFORM), $(CACHED_PLATFORM))
PLATFORM_CHANGED=true
else ifneq ($(PLATFORM_EXTRAS), $(CACHED_PLATFORM_EXTRAS))
PLATFORM_CHANGED=true
else ifneq ($(PLATFORM_DEFS), $(CACHED_PLATFORM_DEFS))
else ifneq ($(strip $(PLATFORM_DEFS)), $(strip $(CACHED_PLATFORM_DEFS)))
PLATFORM_CHANGED=true
endif