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
This commit is contained in:
Jan Lindemann 2008-05-06 16:04:11 +00:00 committed by Jan Lindemann
commit c21cc90f66

View file

@ -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) $< $@