From 621c39f07630eda8413e1aab7abf48710753791a Mon Sep 17 00:00:00 2001 From: Jan Lindemann Date: Thu, 27 Dec 2018 16:59:29 +0000 Subject: [PATCH] rules.mk: Pass -D to /usr/bin/install $(BUILD_XXX)/% This is an experimental commit, mostly facilitating creation of more intricate include file structures below $(TOPDIR)/include. Probably doesn't hurt but is only part of the story, since proper clean target support isn't provided per se. Signed-off-by: Jan Lindemann --- make/rules.mk | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/make/rules.mk b/make/rules.mk index 1a4ebb87..513d7931 100644 --- a/make/rules.mk +++ b/make/rules.mk @@ -5,6 +5,10 @@ # -- standard targets all: + +ifndef JW_BUILD_RULES_MK_INCLUDED +JW_BUILD_RULES_MK_INCLUDED = true + install: all clean: tmpclean distclean: clean @@ -375,16 +379,16 @@ $$(TOPDIR)/dir_install_$(1).done: $$(BUILD_$(1)DIR)/%: % | $$(TOPDIR)/dir_build_$(1).done @if [ ! $$< -ef $$@ -a "`echo $$< | $(SED) 's/\..*//'`" != local ]; then \ - echo $(BIN_INSTALL) -p -m $($(1)MODE) $$< $$@ ;\ - $(BIN_INSTALL) -p -m $($(1)MODE) $$< $$@ ;\ + echo $(BIN_INSTALL) -D -p -m $($(1)MODE) $$< $$@ ;\ + $(BIN_INSTALL) -D -p -m $($(1)MODE) $$< $$@ ;\ $(RM) -f $$(TOPDIR)/dirs-*.done ;\ fi $$(INSTALL_$(1)DIR): - $$(INSTALL) -d -o $$($(1)DIROWNER) -g $$($(1)DIRGROUP) -m $$($(1)DIRMODE) $$(INSTALL_$(1)DIR) + $$(INSTALL) -D -d -o $$($(1)DIROWNER) -g $$($(1)DIRGROUP) -m $$($(1)DIRMODE) $$(INSTALL_$(1)DIR) $$(INSTALL_$(1)DIR)/%: % | $$(INSTALL_$(1)DIR) - $$(INSTALL) -p -o $$($(1)OWNER) -g $$($(1)GROUP) -m $$($(1)MODE) $$< $$@ + $$(INSTALL) -D -p -o $$($(1)OWNER) -g $$($(1)GROUP) -m $$($(1)MODE) $$< $$@ endef #endef @@ -411,3 +415,4 @@ find: collect: bash $(MOD_SCRIPT_DIR)/collect-installed-pkg-changes.sh -t $(TOPDIR) +endif # ifndef JW_BUILD_RULES_MK_INCLUDED