make: Rpm build machinery now installs less empty directories

Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
Jan Lindemann 2014-07-22 09:08:40 +00:00
commit 0b9bc94a48
7 changed files with 23 additions and 14 deletions

View file

@ -3,8 +3,8 @@ include $(MODDIR)/make/rules.mk
all:
clean: clean.conf
install: install_CFG install_SYSCFG install_LOGROT install_CRONTAB install_RSYSLOG \
install_APACHE_CONF install_SYSTEMD $(CONF_D)
install: install_CFG install_files_SYSCFG install_files_LOGROT install_files_CRONTAB install_files_RSYSLOG \
install_files_APACHE_CONF install_files_SYSTEMD $(CONF_D)
clean.conf:
rm -rf *.h *~ .*.swp *.done

View file

@ -3,7 +3,7 @@ include $(MODDIR)/make/rules.mk
all:
clean: clean.conf
install: install_CFG install_SYSCFG install_LOGROT $(CONF_D)
install: install_CFG install_files_SYSCFG install_files_LOGROT $(CONF_D)
clean.conf:
rm -rf *.h *~ .*.swp *.done

View file

@ -601,7 +601,7 @@ ifdef INSTALL_LINK
LINK_LIB = sudo $(MOD_SCRIPT_DIR)/log_install.sh -LA
else
ifdef INSTALL_LOG
INSTALL=$(MOD_SCRIPT_DIR)/log_install.sh -l $(INSTALL_LOG)
INSTALL=$(MOD_SCRIPT_DIR)/log_install.sh -p -l $(INSTALL_LOG)
LINK_LIB=$(MOD_SCRIPT_DIR)/log_install.sh -L -l $(INSTALL_LOG)
else
ifndef INSTALL

View file

@ -25,7 +25,7 @@ distclean: clean
local_libclean: clean.mingw clean.unix clean.all
ifneq ($(wildcard *.so *.so.*),)
install: install_LD_CONF
install: install_files_LD_CONF
endif
clean.unix:

View file

@ -10,6 +10,6 @@ include $(MODDIR)/make/defs.mk
include $(MODDIR)/make/rules.mk
all:
install: install_PROFILE
install: install_files_PROFILE
clean: allclean localclean doneclean textclean

View file

@ -300,39 +300,47 @@ endef
# --- special installation rules, that the general rules farther down
# below don't catch for whatever reason >
$(INSTALL_INITDIR)/%: %.init | install_dir_INIT
$(INSTALL_INITDIR)/%: %.init | provide_dir_INIT
$(INSTALL) -o $(INITOWNER) -g $(INITGROUP) -m $(INITMODE) $< $@
$(INSTALL_SYSTEMDDIR)/%.service: %.service | install_dir_SYSTEMD
$(INSTALL_SYSTEMDDIR)/%.service: %.service | provide_dir_SYSTEMD
$(INSTALL) -o $(SYSTEMDOWNER) -g $(SYSTEMDGROUP) -m $(SYSTEMDMODE) $< $@
$(INSTALL_LOGROTDIR)/%: %.logrotate | install_dir_LOGROT
$(INSTALL_LOGROTDIR)/%: %.logrotate | provide_dir_LOGROT
$(INSTALL) -o $(LOGROTOWNER) -g $(LOGROTGROUP) -m $(LOGROTMODE) $< $@
$(INSTALL_APACHE_CONFDIR)/%.conf: %.apache-conf | install_dir_APACHE_CONF
$(INSTALL_APACHE_CONFDIR)/%.conf: %.apache-conf | provide_dir_APACHE_CONF
$(INSTALL) -o $(APACHE_CONFOWNER) -g $(APACHE_CONFGROUP) -m $(APACHE_CONFMODE) $< $@
$(INSTALL_RSYSLOGDIR)/%.conf: %.rsyslog | install_dir_RSYSLOG
$(INSTALL_RSYSLOGDIR)/%.conf: %.rsyslog | provide_dir_RSYSLOG
$(INSTALL) -o $(RSYSLOGOWNER) -g $(RSYSLOGGROUP) -m $(RSYSLOGMODE) $< $@
$(INSTALL_RSYSLOGDIR)/%.bprof: rsyslog-%.bprof | install_dir_RSYSLOG
$(INSTALL_RSYSLOGDIR)/%.bprof: rsyslog-%.bprof | provide_dir_RSYSLOG
$(INSTALL) -o $(RSYSLOGOWNER) -g $(RSYSLOGGROUP) -m $(RSYSLOGMODE) $< $@
$(INSTALL_SYSCFGDIR)/%: %.sysconf | install_dir_SYSCFG
$(INSTALL_SYSCFGDIR)/%: %.sysconf | provide_dir_SYSCFG
$(INSTALL) -o $(INITOWNER) -g $(INITGROUP) -m $(INITMODE) $< $@
# --- special installation rules <
# saving performance, so don't expand this always
#ifeq ($(MAKE_CMDGOAL),install)
define std_install_rules
build_$(1): $$(TOPDIR)/dir_build_$(1).done $$(BUILD_$(1))
install_dir_$(1): | $$(INSTALL_$(1)DIR)
provide_dir_$(1): | $$(TOPDIR)/dir_install_$(1).done
install_$(1): install_dir_$(1) $$(INSTALLED_$(1))
install_files_$(1): provide_dir_$(1) $$(INSTALLED_$(1))
$$(TOPDIR)/dir_build_$(1).done:
mkdir -p $$(BUILD_$(1)DIR)
touch $$@
$$(TOPDIR)/dir_install_$(1).done:
mkdir -p $$(INSTALL_$(1)DIR)
touch $$@
$$(BUILD_$(1)DIR)/%: % $$(TOPDIR)/dir_build_$(1).done
@if [ ! $$< -ef $$@ -a "`echo $$< | $(SED) 's/\..*//'`" != local ]; then \
echo install -m $($(1)MODE) $$< $$@ ;\
@ -347,6 +355,7 @@ $$(INSTALL_$(1)DIR)/%: % | $$(INSTALL_$(1)DIR)
$$(INSTALL) -o $$($(1)OWNER) -g $$($(1)GROUP) -m $$($(1)MODE) $$< $$@
endef
#endef
$(foreach type, $(INSTALLATION_FILE_TYPES), $(eval $(call std_install_rules,$(type))))

View file

@ -1,6 +1,6 @@
all.done: $(BUILD_SCRIPT)
all: build_EXE build_CGI
install: install_INIT install_EXE install_CGI
install: install_files_INIT install_EXE install_files_CGI
clean:allclean localclean doneclean textclean clean.init
test: