proj.mk: Support JWBDIR_NAME and JWBDIR_SEARCH_PATH

- Streamline proj.mk over all projects a little

  - Turn the string "jw-build" into a variable which can be overridden from the
    environment.

  - Add support for JWBDIR_SEARCH_PATH, also overridable from the environment.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2025-11-05 10:42:53 +01:00
commit 31a80a88d6

View file

@ -1,7 +1,10 @@
# to be included from inside the project directory
# To be included from inside the project directory
# -- Find JWBDIR
DEV_PROJECTS_DIR ?= $(TOPDIR)/..
JWBDIR ?= $(firstword $(wildcard $(DEV_PROJECTS_DIR)/jw-build $(BUILD_TOOLS_PREFIX)/opt/$(FLAVOUR_PATH_PREFIX)jw-build))
JWBDIR_NAME ?= jw-build
JWBDIR_SEARCH_PATH ?= $(DEV_PROJECTS_DIR) $(BUILD_TOOLS_PREFIX)/opt/$(FLAVOUR_PATH_PREFIX)
JWBDIR ?= $(firstword $(wildcard $(addsuffix /$(JWBDIR_NAME),$(JWBDIR_SEARCH_PATH))))
include $(JWBDIR)/make/projects.mk