diff options
author | Masahiro Yamada | 2020-03-07 02:08:51 +0900 |
---|---|---|
committer | Masahiro Yamada | 2020-03-25 10:19:43 +0900 |
commit | 2431f22a911a6130a10b4a0c6f13d10ede007d39 (patch) | |
tree | 4753c9c93827f18e0818bb0d6cb0063a67d19238 | |
parent | b1112139a103b4b1101d0d2d72931f2d33d8c978 (diff) |
kbuild: compute the dtbs_install destination more simply
The 'dtbinst_root' is used to remember the root of the in-kernel dts
directory (i.e. arch/*/boot/dts), but it looks clumsy.
I prefer using two variables 'obj' and 'dst' to track the in-kernel
directory and the install destination, respectively.
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
-rw-r--r-- | Makefile | 2 | ||||
-rw-r--r-- | scripts/Makefile.dtbinst | 8 |
2 files changed, 3 insertions, 7 deletions
@@ -1258,7 +1258,7 @@ endif dtbs_check: dtbs dtbs_install: - $(Q)$(MAKE) $(dtbinst)=$(dtstree) + $(Q)$(MAKE) $(dtbinst)=$(dtstree) dst=$(INSTALL_DTBS_PATH) ifdef CONFIG_OF_EARLY_FLATTREE all: dtbs diff --git a/scripts/Makefile.dtbinst b/scripts/Makefile.dtbinst index 7301ab5e2e06..fcd5f2eaaad1 100644 --- a/scripts/Makefile.dtbinst +++ b/scripts/Makefile.dtbinst @@ -13,8 +13,6 @@ src := $(obj) PHONY := __dtbs_install __dtbs_install: -export dtbinst_root ?= $(obj) - include include/config/auto.conf include scripts/Kbuild.include include $(src)/Makefile @@ -26,13 +24,11 @@ dtbinst-dirs := $(subdir-y) $(subdir-m) quiet_cmd_dtb_install = INSTALL $< cmd_dtb_install = mkdir -p $(2); cp $< $(2) -install-dir = $(patsubst $(dtbinst_root)%,$(INSTALL_DTBS_PATH)%,$(obj)) - $(dtbinst-files): %.dtb: $(obj)/%.dtb - $(call cmd,dtb_install,$(install-dir)) + $(call cmd,dtb_install,$(dst)) $(dtbinst-dirs): - $(Q)$(MAKE) $(dtbinst)=$(obj)/$@ + $(Q)$(MAKE) $(dtbinst)=$(obj)/$@ dst=$(dst)/$@ PHONY += $(dtbinst-files) $(dtbinst-dirs) __dtbs_install: $(dtbinst-files) $(dtbinst-dirs) |