jw-pkg/make/conf.mk
Jan Lindemann f33f47c2b3
All checks were successful
CI / Packaging - Kali Linux (pull_request) Successful in 3m50s
CI / Packaging - OpenSUSE Tumbleweed (pull_request) Successful in 4m17s
CI / Packaging test (pull_request) Successful in 0s
CI / Packaging - Kali Linux (push) Successful in 3m49s
CI / Packaging - OpenSUSE Tumbleweed (push) Successful in 4m7s
CI / Packaging test (push) Successful in 0s
make: Fix CONFIG_SUBDIR
The existence of CONFIG_SUBDIR hijacks INSTALL_CFGDIR to a subdirectory (by
default /etc/opt/<package>/$(CONFIG_SUBDIR)). Then std_install_rules apply,
and (the bent) INSTALL_CFGDIR is installed, but its parent directory, the
original $(INSTALL_CFGDIR), is not a prerequisite of install anylonger, and
has no rule anymore, hence log-install is never run for it. Instead it's
implicitly created by log-install -D $(INSTALL_CFGDIR).

This commit gives /etc/opt/<package> std-install rule and variables back as
CFGTOPDIR variants, and inserts it early into the install target's
prerequisite list.

Signed-off-by: Jan Lindemann <jan@janware.com>
2026-09-07 09:23:17 +02:00

34 lines
805 B
Makefile

include $(JWBDIR)/make/defs.mk
include $(JWBDIR)/make/rules.mk
include $(JWBDIR)/make/dev-utils.mk
all:
clean: clean.conf
install: \
$(INSTALL_CFGTOPDIR) \
install_CFG \
install_files_SYSCFG \
install_files_LOGROT \
install_files_CRONTAB \
install_files_RSYSLOG \
install_files_APACHE_CONF \
install_files_SYSTEMD \
install_files_INIT \
install_files_TMPFILES \
$(CONF_D)
test: all
clean.conf:
$(RM) -rf *~ .*.swp *.done
ifneq ($(INSTALL_CFGTOPDIR),)
$(INSTALL_CFGTOPDIR):
$(INSTALL) -D -d -m $(CFGTOPDIRMODE) -o $(CFGTOPDIROWNER) -g $(CFGTOPDIRGROUP) $@
endif
ifneq ($(CONF_D),)
INSTALLED_CONF_D = $(addprefix $(INSTALL_CFGDIR)/,$(CONF_D))
$(INSTALL_CFGDIR)/$(CONF_D):
$(INSTALL) -d -m $(CFGDIRMODE) -o $(CFGDIROWNER) -g $(CFGDIRGROUP) $@
install: $(INSTALLED_CONF_D)
endif