mirror of
ssh://git.janware.com/srv/git/janware/proj/jw-pkg
synced 2026-01-15 12:03:31 +01:00
make: Rpm build machinery now installs less empty directories
Signed-off-by: Jan Lindemann <jan@janware.com>
This commit is contained in:
parent
28dfd4d4d6
commit
0b9bc94a48
7 changed files with 23 additions and 14 deletions
|
|
@ -3,8 +3,8 @@ include $(MODDIR)/make/rules.mk
|
||||||
|
|
||||||
all:
|
all:
|
||||||
clean: clean.conf
|
clean: clean.conf
|
||||||
install: install_CFG install_SYSCFG install_LOGROT install_CRONTAB install_RSYSLOG \
|
install: install_CFG install_files_SYSCFG install_files_LOGROT install_files_CRONTAB install_files_RSYSLOG \
|
||||||
install_APACHE_CONF install_SYSTEMD $(CONF_D)
|
install_files_APACHE_CONF install_files_SYSTEMD $(CONF_D)
|
||||||
|
|
||||||
clean.conf:
|
clean.conf:
|
||||||
rm -rf *.h *~ .*.swp *.done
|
rm -rf *.h *~ .*.swp *.done
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,7 @@ include $(MODDIR)/make/rules.mk
|
||||||
|
|
||||||
all:
|
all:
|
||||||
clean: clean.conf
|
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:
|
clean.conf:
|
||||||
rm -rf *.h *~ .*.swp *.done
|
rm -rf *.h *~ .*.swp *.done
|
||||||
|
|
|
||||||
|
|
@ -601,7 +601,7 @@ ifdef INSTALL_LINK
|
||||||
LINK_LIB = sudo $(MOD_SCRIPT_DIR)/log_install.sh -LA
|
LINK_LIB = sudo $(MOD_SCRIPT_DIR)/log_install.sh -LA
|
||||||
else
|
else
|
||||||
ifdef INSTALL_LOG
|
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)
|
LINK_LIB=$(MOD_SCRIPT_DIR)/log_install.sh -L -l $(INSTALL_LOG)
|
||||||
else
|
else
|
||||||
ifndef INSTALL
|
ifndef INSTALL
|
||||||
|
|
|
||||||
|
|
@ -25,7 +25,7 @@ distclean: clean
|
||||||
local_libclean: clean.mingw clean.unix clean.all
|
local_libclean: clean.mingw clean.unix clean.all
|
||||||
|
|
||||||
ifneq ($(wildcard *.so *.so.*),)
|
ifneq ($(wildcard *.so *.so.*),)
|
||||||
install: install_LD_CONF
|
install: install_files_LD_CONF
|
||||||
endif
|
endif
|
||||||
|
|
||||||
clean.unix:
|
clean.unix:
|
||||||
|
|
|
||||||
|
|
@ -10,6 +10,6 @@ include $(MODDIR)/make/defs.mk
|
||||||
include $(MODDIR)/make/rules.mk
|
include $(MODDIR)/make/rules.mk
|
||||||
|
|
||||||
all:
|
all:
|
||||||
install: install_PROFILE
|
install: install_files_PROFILE
|
||||||
clean: allclean localclean doneclean textclean
|
clean: allclean localclean doneclean textclean
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -300,39 +300,47 @@ endef
|
||||||
|
|
||||||
# --- special installation rules, that the general rules farther down
|
# --- special installation rules, that the general rules farther down
|
||||||
# below don't catch for whatever reason >
|
# 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) -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) -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) -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) -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) -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) -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) $< $@
|
$(INSTALL) -o $(INITOWNER) -g $(INITGROUP) -m $(INITMODE) $< $@
|
||||||
|
|
||||||
# --- special installation rules <
|
# --- special installation rules <
|
||||||
|
|
||||||
|
# saving performance, so don't expand this always
|
||||||
|
#ifeq ($(MAKE_CMDGOAL),install)
|
||||||
define std_install_rules
|
define std_install_rules
|
||||||
|
|
||||||
build_$(1): $$(TOPDIR)/dir_build_$(1).done $$(BUILD_$(1))
|
build_$(1): $$(TOPDIR)/dir_build_$(1).done $$(BUILD_$(1))
|
||||||
install_dir_$(1): | $$(INSTALL_$(1)DIR)
|
install_dir_$(1): | $$(INSTALL_$(1)DIR)
|
||||||
|
provide_dir_$(1): | $$(TOPDIR)/dir_install_$(1).done
|
||||||
install_$(1): install_dir_$(1) $$(INSTALLED_$(1))
|
install_$(1): install_dir_$(1) $$(INSTALLED_$(1))
|
||||||
|
install_files_$(1): provide_dir_$(1) $$(INSTALLED_$(1))
|
||||||
|
|
||||||
$$(TOPDIR)/dir_build_$(1).done:
|
$$(TOPDIR)/dir_build_$(1).done:
|
||||||
mkdir -p $$(BUILD_$(1)DIR)
|
mkdir -p $$(BUILD_$(1)DIR)
|
||||||
touch $$@
|
touch $$@
|
||||||
|
|
||||||
|
$$(TOPDIR)/dir_install_$(1).done:
|
||||||
|
mkdir -p $$(INSTALL_$(1)DIR)
|
||||||
|
touch $$@
|
||||||
|
|
||||||
$$(BUILD_$(1)DIR)/%: % $$(TOPDIR)/dir_build_$(1).done
|
$$(BUILD_$(1)DIR)/%: % $$(TOPDIR)/dir_build_$(1).done
|
||||||
@if [ ! $$< -ef $$@ -a "`echo $$< | $(SED) 's/\..*//'`" != local ]; then \
|
@if [ ! $$< -ef $$@ -a "`echo $$< | $(SED) 's/\..*//'`" != local ]; then \
|
||||||
echo install -m $($(1)MODE) $$< $$@ ;\
|
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) $$< $$@
|
$$(INSTALL) -o $$($(1)OWNER) -g $$($(1)GROUP) -m $$($(1)MODE) $$< $$@
|
||||||
|
|
||||||
endef
|
endef
|
||||||
|
#endef
|
||||||
|
|
||||||
$(foreach type, $(INSTALLATION_FILE_TYPES), $(eval $(call std_install_rules,$(type))))
|
$(foreach type, $(INSTALLATION_FILE_TYPES), $(eval $(call std_install_rules,$(type))))
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1,6 +1,6 @@
|
||||||
all.done: $(BUILD_SCRIPT)
|
all.done: $(BUILD_SCRIPT)
|
||||||
all: build_EXE build_CGI
|
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
|
clean:allclean localclean doneclean textclean clean.init
|
||||||
test:
|
test:
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue