From 2cafd60b71a8950689adc8148cb2af5d60a1109f Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Thu, 18 Jun 2026 12:29:05 +0200 Subject: [PATCH] platform.mk: Support PREREQ_RUN_ADD Modifying JW_PKG_XXX_PATH in pre-local.mk is fragile. Amending PREREQ_RUN in pre-local.mk works, but only with $(JW_PKG_NO_CACHE) == true, or if "undefine JW_PKG_XXX_PATH" is also added in pre-local.mk. Otherwise JW_PKG_XXX_PATH will not be recomputed, because it's already defined from the cache. Introduce the new variable PREREQ_RUN_ADD to solve that. If it's defined, it automatically invalidates the JW_PKG_XXX_PATH variables and sets them up for recalculation in py-path.mk / ldlibpath.mk. Signed-off-by: Jan Lindemann --- make/platform.mk | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/make/platform.mk b/make/platform.mk index bf161fdd..117b4dc0 100644 --- a/make/platform.mk +++ b/make/platform.mk @@ -18,6 +18,14 @@ $(eval $(call try_include,$(JWBDIR)/make/pre-local.mk)) $(eval $(call try_include,$(TOPDIR)/make/pre-local.mk)) $(eval $(call try_include,pre-local.mk)) +ifdef PREREQ_RUN_ADD + # If PREREQ_RUN_ADD was defined in pre-local.mk, set these potentially cached + # paths up for fresh calculation in ldlibpath.mk / py-path.mk + undefine JW_PKG_EXE_PATH + undefine JW_PKG_LD_LIBRARY_PATH + undefine JW_PKG_PYTHON_PATH + PREREQ_RUN += $(PREREQ_RUN_ADD) +endif # -- What do I know about myself? VERSION_FILE ?= $(firstword $(wildcard VERSION) $(TOPDIR)/VERSION)