mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 12:03:31 +01:00
make: Support CONFIG_SUBDIR and CONF_D
This commit is contained in:
parent
d7d73b2040
commit
05ed5dfd02
2 changed files with 19 additions and 2 deletions
15
make/conf.mk
15
make/conf.mk
|
|
@ -3,8 +3,21 @@ include $(MODDIR)/make/rules.mk
|
||||||
|
|
||||||
all:
|
all:
|
||||||
clean: clean.conf
|
clean: clean.conf
|
||||||
install: install_CFG install_SYSCFG install_LOGROT
|
install: install_CFG install_SYSCFG install_LOGROT $(CONF_D)
|
||||||
|
|
||||||
clean.conf:
|
clean.conf:
|
||||||
rm -rf *.h *~ .*.swp *.done
|
rm -rf *.h *~ .*.swp *.done
|
||||||
|
|
||||||
|
ifneq ($(CONFIG_SUBDIR),)
|
||||||
|
$(INSTALLED_CFG): $(INSTALL_CFGDIR)
|
||||||
|
|
||||||
|
$(INSTALL_CFGDIR):
|
||||||
|
install -d -m $(CFGDIRMODE) -d $(CFGDIROWNER) -g $(CFGDIRGROUP) $@
|
||||||
|
endif
|
||||||
|
|
||||||
|
ifneq ($(CONF_D),)
|
||||||
|
INSTALLED_CONF_D = $(addprefix $(INSTALL_CFGDIR)/,$(CONF_D))
|
||||||
|
$(INSTALL_CFGDIR)/$(CONF_D):
|
||||||
|
install -d -m $(CFGDIRMODE) -d $(CFGDIROWNER) -g $(CFGDIRGROUP) $@
|
||||||
|
install: $(INSTALLED_CONF_D)
|
||||||
|
endif
|
||||||
|
|
|
||||||
|
|
@ -200,9 +200,13 @@ IMAGES += $(wildcard *.png *.jpg *.bmp)
|
||||||
|
|
||||||
# -- CFG
|
# -- CFG
|
||||||
CONFIG_FILE ?= $(CONFIG_DIR)/$(PROJECT).conf
|
CONFIG_FILE ?= $(CONFIG_DIR)/$(PROJECT).conf
|
||||||
SYSCFG_FILE ?= $(SYSCFG_DIR)/$(PROJECT)
|
SYSCFG_FILE ?= $(SYSCFG_DIR)/$(PROJECT)
|
||||||
BUILD_CFGDIR = $(TOPDIR)/conf
|
BUILD_CFGDIR = $(TOPDIR)/conf
|
||||||
|
ifeq ($(CONFIG_SUBDIR),)
|
||||||
INSTALL_CFGDIR ?= $(CONFIG_DIR)
|
INSTALL_CFGDIR ?= $(CONFIG_DIR)
|
||||||
|
else
|
||||||
|
INSTALL_CFGDIR ?= $(CONFIG_DIR)/$(CONFIG_SUBDIR)
|
||||||
|
endif
|
||||||
INSTALLED_CFG ?= $(addprefix $(INSTALL_CFGDIR)/,$(wildcard *.conf))
|
INSTALLED_CFG ?= $(addprefix $(INSTALL_CFGDIR)/,$(wildcard *.conf))
|
||||||
|
|
||||||
# -- SYSCFG
|
# -- SYSCFG
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue