From 60ddc971d2d1df5133753dfaad5a07a3a225012e Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Sun, 6 Sep 2026 21:43:17 +0200 Subject: [PATCH] make: Support INSTALL_PREFIXDIR During "make install", the packaging machinery should run "$(LOG_INSTALL) -D /opt/" but runs "mkdir -p /opt/" instead. As a consequence, the created directory is not owned by any of the created packages. This commit fixes that by introducing INSTALL_PREFIXDIR and installing it like all other directories. Signed-off-by: Jan Lindemann --- make/defs-dev.mk | 1 + make/defs-dist.mk | 1 + make/defs.mk | 2 ++ make/include.mk | 2 +- make/make.mk | 2 +- make/scripts-targets.mk | 2 +- make/so.mk | 2 +- make/yapp.mk | 2 +- 8 files changed, 9 insertions(+), 5 deletions(-) diff --git a/make/defs-dev.mk b/make/defs-dev.mk index 869ad322..db895eb8 100644 --- a/make/defs-dev.mk +++ b/make/defs-dev.mk @@ -31,6 +31,7 @@ LOG_PREFIX ?= $(PREFIX)/log JAVA_PREFIX ?= $(PREFIX) HDR_SCOPE_PREFIX ?= +INSTALL_PREFIXDIR ?= $(PREFIX) DATA_DIR ?= $(FLAVOUR_PATH_PREFIX)$(PREFIX)/data IMAGEDIR ?= $(DATA_DIR)/images JSON_DIR ?= $(DATA_DIR)/json diff --git a/make/defs-dist.mk b/make/defs-dist.mk index 03dc3574..83981fd4 100644 --- a/make/defs-dist.mk +++ b/make/defs-dist.mk @@ -31,6 +31,7 @@ LOG_PREFIX ?= $(ENV_PREFIX)/var/log JAVA_PREFIX ?= $(PREFIX) HDR_SCOPE_PREFIX ?= +INSTALL_PREFIXDIR ?= $(PREFIX) DATA_DIR ?= $(FLAVOUR_PATH_PREFIX)$(PREFIX)/data IMAGEDIR ?= $(DATA_DIR)/images JSON_DIR ?= $(DATA_DIR)/json diff --git a/make/defs.mk b/make/defs.mk index 25f014b0..2eb295f4 100644 --- a/make/defs.mk +++ b/make/defs.mk @@ -307,6 +307,8 @@ LOCAL_MKFILES ?= $(wildcard GNUmakefile makefile Makefile *.mk) LOG_QUAL_PREFIX ?= $(LOGID): # -- standard dirs and files for build and install +INSTALLATION_FILE_TYPES += PREFIX + # -- CFG INSTALLATION_FILE_TYPES += CFG CONFIG_FILE ?= $(CONFIG_DIR)/$(PROJECT).conf diff --git a/make/include.mk b/make/include.mk index b98dec5f..948fc05b 100644 --- a/make/include.mk +++ b/make/include.mk @@ -8,7 +8,7 @@ SRC_H += $(PROJ_H) $(wildcard $(HDRDIR_SCOPE_SUFFIX)/*.h) # mandatory targets all: $(PROJ_H) clean: clean.include -install: install_HDR +install: install_dir_PREFIX install_HDR # not wäry naaice ifneq ($(HDRDIR_SCOPE_SUFFIX),) diff --git a/make/make.mk b/make/make.mk index d71ca4d8..c540c447 100644 --- a/make/make.mk +++ b/make/make.mk @@ -31,7 +31,7 @@ endif ifeq ($(CREATE_PKG_CONFIG),true) all: build_PKG_CONFIG endif -install: $(DEVEL_TARGETS) +install: install_dir_PREFIX $(DEVEL_TARGETS) clean: textclean localclean doneclean clean.pkg-config test: all diff --git a/make/scripts-targets.mk b/make/scripts-targets.mk index 4b0a35d8..f59c86f3 100644 --- a/make/scripts-targets.mk +++ b/make/scripts-targets.mk @@ -1,5 +1,5 @@ all: build_EXE build_CGI -install: install_files_INIT install_EXE install_files_CGI install_files_SYSCFG +install: install_dir_PREFIX install_files_INIT install_EXE install_files_CGI install_files_SYSCFG clean:allclean localclean doneclean textclean clean.init test: all diff --git a/make/so.mk b/make/so.mk index 333b8dfa..e6594b95 100644 --- a/make/so.mk +++ b/make/so.mk @@ -18,7 +18,7 @@ include $(JWBDIR)/make/rules.mk all: $(SHOBJS) $(BUILD_SHOBJS) clean: objclean textclean localclean profclean -install: $(ALL) install_dir_LIB installso +install: $(ALL) install_dir_PREFIX install_dir_LIB installso $(BUILD_LIBDIR)/%.so: %.so install -m 755 $< $@ diff --git a/make/yapp.mk b/make/yapp.mk index 42fd2fd0..26371559 100644 --- a/make/yapp.mk +++ b/make/yapp.mk @@ -13,7 +13,7 @@ endif include $(JWBDIR)/make/exe.mk all: build_EXE -install: install_EXE +install: install_dir_PREFIX install_EXE clean: clean.yapp distclean: