make: Miscellaneous versatility improvements #83

Merged
Jan Lindemann merged 5 commits from jan/feature/20260905-make-miscellaneous-versatility-improvements into master 2026-09-05 13:49:10 +02:00 AGit
Showing only changes of commit 9636f1064d - Show all commits

projects-dir.mk: Renovate build-order targets

Renovate the build-order and build-order-% targets as follows:

- Add BUILD_ORDER_DEP_FLAVOURS and default to all currently supported
  build flavours: run,build,test,release. This adds convenience for
  packages declaring differentiated types of dependencies, not only the
  default build dependency, but still want any project it uses somehow
  be be built before them.

- Don't print the recipe's command when running "make build-order", it
  gets in the way if the caller wants to parse the result, so spare him
  filtering it.

- Only log messages with priority warning or higher. Messages go to stderr
  anyway to keep them from throwing wrenches into consuming parsers, but
  they are likely confusingly visible without context if they leak to the
  calling program's console.

Signed-off-by: Jan Lindemann <jan@janware.com>
Jan Lindemann 2026-08-24 14:13:48 +02:00
Signed by: Jan Lindemann
GPG key ID: 3750640C9E25DD61

View file

@ -53,6 +53,8 @@ else
PROJECTS ?= $(shell ls -d */GNUmakefile */Makefile 2>/dev/null | sed 's%/[^/]*%%' | sort -u)
endif
BUILD_ORDER_DEP_FLAVOURS ?= run,build,test,release
ifeq ($(JW_PKG_VERBOSE),true)
SSH_WRAPPER_TRACE ?= -x
endif
@ -182,7 +184,7 @@ help doc-project doc-module:
status: $(SSH_WRAPPER_SH)
build-order-%: $(filter-out $(UNAVAILABLE_TARGETS),pull.done)
$(JW_PKG_PY_BUILD) --build-order $* $(TARGET_PROJECTS) | sed 's/ */\n/g'
@JW_DEFAULT_LOG_LEVEL=WARNING $(JW_PKG_PY_BUILD) --build-order --dep-flavours="$(BUILD_ORDER_DEP_FLAVOURS)" $* $(TARGET_PROJECTS) | sed 's/ */\n/g'
build-order: build-order-all