From c21cc90f663a9d6bd493f4edfa1113eaa1534dcc Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Tue, 6 May 2008 16:04:11 +0000 Subject: [PATCH] rules.mk: Support SYSCFG installation types - Add SYSCFG to automatic installation rules - Manually add rules for .init and .sysconf files, not sure why this is necessary --- make/rules.mk | 26 ++++++++++++++++++++++---- 1 file changed, 22 insertions(+), 4 deletions(-) diff --git a/make/rules.mk b/make/rules.mk index b9175375..43d7e51b 100644 --- a/make/rules.mk +++ b/make/rules.mk @@ -248,7 +248,7 @@ check_not_empty_$(1): fi endef -INSTALLATION_FILE_TYPES = LIB PI HDR EXE SCRIPT INIT DOC PROFILE MAKE CFG IMG LOG JAVA LD_CONF +INSTALLATION_FILE_TYPES = LIB PI HDR EXE SCRIPT INIT DOC PROFILE MAKE CFG SYSCFG IMG LOG JAVA LD_CONF #$(foreach attr,OWNER GROUP MODE,$(foreach type, $(INSTALLATION_FILE_TYPES),\ # $(eval $(call std_install_rules,$(type)$(attr))))) @@ -278,13 +278,31 @@ $$(TOPDIR)/dir_install_$(1).done: fi touch $$@ -$$(INSTALL_$(1)DIR)/%: % $$(TOPDIR)/dir_install_$(1).done +$$(INSTALL_$(1)DIR)/%: % $$(INSTALL) -o $$($(1)OWNER) -g $$($(1)GROUP) -m $$($(1)MODE) $$< $$@ endef $(foreach type, $(INSTALLATION_FILE_TYPES), $(eval $(call std_install_rules,$(type)))) +# --- +# doesn't work, dunno why +%: %.init + cp $< $@ + +# don't know why %: %.init from above doesn't remake % +$(INSTALL_INITDIR)/%: %.init + $(INSTALL) -o $(INITOWNER) -g $(INITGROUP) -m $(INITMODE) $< $@ + +%: %.sysconf + cp $< $@ + +# don't know why %: %.sysconf from above doesn't remake % +$(INSTALL_SYSCFGDIR)/%: %.sysconf + $(INSTALL) -o $(INITOWNER) -g $(INITGROUP) -m $(INITMODE) $< $@ + +# --- + $(LINKS_SO): cd $(dir $@); ln -sf $(shell echo $@ | sed -e 's/\.so$$\|\.so.*$$//').$(SO_SUFFIX) $(notdir $@) @@ -299,6 +317,6 @@ $(INSTALLED_PROFILE_PATH_SCRIPT): $(TOPDIR)/profiledir.done echo "else PATH=\$$PATH:$(shell echo $(INSTALL_EXEDIR) | sed -e s%^$(ENV_PREFIX)/%/%); fi" >> path_script.sh $(INSTALL) -o $(PROFILEOWNER) -g $(PROFILEGROUP) -m $(PROFILEMODE) path_script.sh $@ -$(SYSCONFIG_DIR)/%: % - $(INSTALL) -o $(CFGOWNER) -g $(CFGGROUP) -m $(CFGMODE) $< $@ +#$(SYSCONFIG_DIR)/%: % +# $(INSTALL) -o $(CFGOWNER) -g $(CFGGROUP) -m $(CFGMODE) $< $@