From 0c4a69bd9a679e66690c76adc23f849414638858 Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Thu, 17 Sep 2026 11:26:30 +0200 Subject: [PATCH] projects-dir.mk: Add BUILD_DEP_FLAVOURS_* The top-level all, test, check, check-pre, and check-post targets invoke the build tool without --dep-flavours, so it falls back to the auto default and only resolves dependencies of the flavour "build". The build-order-% target, by contrast, already passes the run,build,test,release set via a single BUILD_ORDER_DEP_FLAVOURS variable. Planning and building therefore rely on different dependency flavours, and none of the targets can be tuned individually. Introduce one flavour variable per target group, all of them defaulting to the run,build,test,release set: - BUILD_DEP_FLAVOURS for all - BUILD_DEP_FLAVOURS_LINT for check, check-pre, and check-post - BUILD_DEP_FLAVOURS_TEST for test - BUILD_DEP_FLAVOURS_ORDER, renamed from BUILD_ORDER_DEP_FLAVOURS, used by build-order-% Split the combined all test check check-pre check-post rule into three rules so that each group passes its own --dep-flavours to the build tool. all, test, and the check targets now also resolve run, test, and release dependencies, as build-order already does, and each target's flavour set can be overridden independently. Note that they all default the whole shebang: run,build,test,release. And this opens up the door to dependency cycles that don't exist with the subset of projects currently used. It's still better to ask for all and then cut down as needed instead of starting small. Signed-off-by: Jan Lindemann Assisted-by: unsloth/Qwen3.8-27B-GGUF:Q4_K_M with pi.dev v0.85.1 --- make/projects-dir.mk | 17 +++++++++++++---- 1 file changed, 13 insertions(+), 4 deletions(-) diff --git a/make/projects-dir.mk b/make/projects-dir.mk index 4b642ab1..d37fc50a 100644 --- a/make/projects-dir.mk +++ b/make/projects-dir.mk @@ -53,7 +53,10 @@ else PROJECTS ?= $(shell ls -d */GNUmakefile */Makefile 2>/dev/null | sed 's%/[^/]*%%' | sort -u) endif -BUILD_ORDER_DEP_FLAVOURS ?= run,build,test,release +BUILD_DEP_FLAVOURS ?= run,build,test,release +BUILD_DEP_FLAVOURS_LINT ?= run,build,test,release +BUILD_DEP_FLAVOURS_TEST ?= run,build,test,release +BUILD_DEP_FLAVOURS_ORDER ?= run,build,test,release ifeq ($(JW_PKG_VERBOSE),true) SSH_WRAPPER_TRACE ?= -x @@ -158,8 +161,14 @@ PROJECTS_WITH_PROJECT_CONF = $(patsubst %/make/project.conf,%,$(wildcard $(add # --- mandatory targets all: -all test check check-pre check-post: $(filter-out $(UNAVAILABLE_TARGETS),pull.done) - $(JW_PKG_PY_BUILD) $@ $(TARGET_PROJECTS) +all: $(filter-out $(UNAVAILABLE_TARGETS),pull.done) + $(JW_PKG_PY_BUILD) --dep-flavours="$(BUILD_DEP_FLAVOURS)" $@ $(TARGET_PROJECTS) +check check-pre check-post: $(filter-out $(UNAVAILABLE_TARGETS),pull.done) + $(JW_PKG_PY_BUILD) --dep-flavours="$(BUILD_DEP_FLAVOURS_LINT)" $@ $(TARGET_PROJECTS) +test: $(filter-out $(UNAVAILABLE_TARGETS),pull.done) + $(JW_PKG_PY_BUILD) --dep-flavours="$(BUILD_DEP_FLAVOURS_TEST)" $@ $(TARGET_PROJECTS) + + clean: clean-dirs distclean: clean-all-dirs done.clean install: @@ -184,7 +193,7 @@ help doc-project doc-module: status: $(SSH_WRAPPER_SH) build-order-%: $(filter-out $(UNAVAILABLE_TARGETS),pull.done) - @JW_DEFAULT_LOG_LEVEL=WARNING $(JW_PKG_PY_BUILD) --build-order --dep-flavours="$(BUILD_ORDER_DEP_FLAVOURS)" $* $(TARGET_PROJECTS) | sed 's/ */\n/g' + @JW_DEFAULT_LOG_LEVEL=WARNING $(JW_PKG_PY_BUILD) --build-order --dep-flavours="$(BUILD_DEP_FLAVOURS_ORDER)" $* $(TARGET_PROJECTS) | sed 's/ */\n/g' build-order: build-order-all