From 944df09aa7195e6c6e35fcfb2e7b3236b427c71c Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Tue, 20 Oct 2026 09:57:11 +0200 Subject: [PATCH] defs.mk: Make common PKG_CONFIG build dir opt-in f70b14e92 ("defs.mk: Disable BUILD_PKG_CONFIG") disabled the BUILD_PKG_CONFIG copy target, but the dir_build_PKG_CONFIG.done rule still runs `mkdir -p $(BUILD_PKG_CONFIGDIR)`, and that directory is keyed off DEVELOPMENT. A dev-version downstream package built against an installed, read-only jw-pkg therefore resolves BUILD_PKG_CONFIGDIR to $(JWBDIR)/pkgconfig and fails the build with "mkdir: Permission denied". Default BUILD_PKG_CONFIGDIR to project-local $(TOPDIR)/make regardless of DEVELOPMENT, and leave it overridable so that a self-contained build over multiple projects can point it at some shared $(JWBDIR)/pkgconfig directory at the user's discretion. Signed-off-by: Jan Lindemann --- make/defs.mk | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/make/defs.mk b/make/defs.mk index 277fc2de..111345c6 100644 --- a/make/defs.mk +++ b/make/defs.mk @@ -491,11 +491,11 @@ endif ifeq ($(CREATE_PKG_CONFIG),true) INSTALLATION_FILE_TYPES += PKG_CONFIG PKG_CONFIG += $(sort $(filter-out $(DONT_INSTALL),$(wildcard *.pc) $(LOCAL_PKG_CONFIG))) - ifeq ($(DEVELOPMENT),true) - BUILD_PKG_CONFIGDIR = $(JWBDIR)/pkgconfig - else - BUILD_PKG_CONFIGDIR = $(TOPDIR)/make - endif + # Having BUILD_PKG_CONFIGDIR point to $(TOPDIR)/make makes it a build-time + # no-op. Override BUILD_PKG_CONFIGDIR to $(JWBDIR)/pkgconfig if you want a + # self-contained (i.e. non-installed) build over multiple projects to share + # a common PKG_CONFIG directory. + BUILD_PKG_CONFIGDIR ?= $(TOPDIR)/make LOCAL_PKG_CONFIG = $(PROJECT).pc # As of now, this is not used by any downstream project, so disable it to reduce complexity. #BUILD_PKG_CONFIG = $(BUILD_PKG_CONFIGDIR)/$(LOCAL_PKG_CONFIG)