forked from luck/tmp_suning_uos_patched
kbuild: refactor Makefile.dtbinst more
Refactor Makefile.dtbinst so it looks similar to other Makefiles. *.dtb should not be a phony target. Copy files based on the timestamps. Print installed dtb paths instead of in-kernel dtb paths. Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
This commit is contained in:
parent
2431f22a91
commit
aefd80307a
|
@ -17,20 +17,20 @@ include include/config/auto.conf
|
||||||
include scripts/Kbuild.include
|
include scripts/Kbuild.include
|
||||||
include $(src)/Makefile
|
include $(src)/Makefile
|
||||||
|
|
||||||
dtbinst-files := $(sort $(dtb-y) $(if $(CONFIG_OF_ALL_DTBS), $(dtb-)))
|
dtbs := $(addprefix $(dst)/, $(dtb-y) $(if $(CONFIG_OF_ALL_DTBS),$(dtb-)))
|
||||||
dtbinst-dirs := $(subdir-y) $(subdir-m)
|
subdirs := $(addprefix $(obj)/, $(subdir-y) $(subdir-m))
|
||||||
|
|
||||||
# Helper targets for Installing DTBs into the boot directory
|
__dtbs_install: $(dtbs) $(subdirs)
|
||||||
quiet_cmd_dtb_install = INSTALL $<
|
@:
|
||||||
cmd_dtb_install = mkdir -p $(2); cp $< $(2)
|
|
||||||
|
|
||||||
$(dtbinst-files): %.dtb: $(obj)/%.dtb
|
quiet_cmd_dtb_install = INSTALL $@
|
||||||
$(call cmd,dtb_install,$(dst))
|
cmd_dtb_install = install -D $< $@
|
||||||
|
|
||||||
$(dtbinst-dirs):
|
$(dst)/%.dtb: $(obj)/%.dtb
|
||||||
$(Q)$(MAKE) $(dtbinst)=$(obj)/$@ dst=$(dst)/$@
|
$(call cmd,dtb_install)
|
||||||
|
|
||||||
PHONY += $(dtbinst-files) $(dtbinst-dirs)
|
PHONY += $(subdirs)
|
||||||
__dtbs_install: $(dtbinst-files) $(dtbinst-dirs)
|
$(subdirs):
|
||||||
|
$(Q)$(MAKE) $(dtbinst)=$@ dst=$(patsubst $(obj)/%,$(dst)/%,$@)
|
||||||
|
|
||||||
.PHONY: $(PHONY)
|
.PHONY: $(PHONY)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user