projects+project.mk: Add file

Multiple variables are redundantly defined both for a project and for
the multiple-projects toplevel directory. Add a place to maintain
them centrally, and add PGIT_SH as a first variable.

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2026-02-17 17:37:03 +01:00
commit 7f85a5f2d6
3 changed files with 6 additions and 1 deletions

5
make/projects+project.mk Normal file
View file

@ -0,0 +1,5 @@
# This file contains definitions useful to both Makefiles inside a project, and
# the Makefile inside the toplevel directory containing multiple projects (see
# projects-dir-minimal.mk / projects-dir.mk for details)
PGIT_SH = /bin/bash $(JWB_SCRIPT_DIR)/pgit.sh

View file

@ -1,3 +1,4 @@
all: all:
include $(JWBDIR)/make/projects+project.mk
include $(JWBDIR)/make/projects-dir.mk include $(JWBDIR)/make/projects-dir.mk

View file

@ -118,7 +118,6 @@ JW_PKG_PY_PROJECTS = $(JW_PKG_PY) projects
JW_PKG_PY_BUILD = $(JW_PKG_PY_PROJECTS) build $(JW_PKG_PY_EXTRA_BUILD_OPTS) JW_PKG_PY_BUILD = $(JW_PKG_PY_PROJECTS) build $(JW_PKG_PY_EXTRA_BUILD_OPTS)
PKG_MANAGER ?= $(JW_PKG_PY) distro --interactive=$(INTERACTIVE) PKG_MANAGER ?= $(JW_PKG_PY) distro --interactive=$(INTERACTIVE)
PGIT_SH := /bin/bash $(JWB_SCRIPT_DIR)/pgit.sh
ifneq ($(origin PROJECTS_DIR_REMOTE_BASE),undefined) ifneq ($(origin PROJECTS_DIR_REMOTE_BASE),undefined)
PGIT_SH += --remote-base $(PROJECTS_DIR_REMOTE_BASE) PGIT_SH += --remote-base $(PROJECTS_DIR_REMOTE_BASE)
endif endif