aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorVignesh Raghavendra <vigneshr@ti.com>2020-09-25 11:04:14 +0530
committerVignesh Raghavendra <vigneshr@ti.com>2020-09-25 11:04:14 +0530
commit9a39e27c4245a6cf4fa745a1394ee7fd76b4956c (patch)
tree9ff4a8b436fe89c45dad7ee961b23c4a00b5598a
parentc00e801ee6f4d922b4af87d97a908fbbf6f63426 (diff)
downloadlinux-dt-9a39e27c4245a6cf4fa745a1394ee7fd76b4956c.tar.gz
Makefile: Fix build when output directory is specific
Currently build fails when output directory is passed to make via O= option. This is because output directory prefix is not stripped when deriving directory path in $Linux folder of corresponding .dts file and is being included as is. Fix this by stripping $O prefix from file's directory path when using with -i. Signed-off-by: Vignesh Raghavendra <vigneshr@ti.com>
-rw-r--r--Makefile2
1 files changed, 1 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 3dd99fb..76d5a88 100644
--- a/Makefile
+++ b/Makefile
@@ -91,7 +91,7 @@ $(dtb_tmp): $(O)/%.dts.pre : $(LINUX)/%.dts
$(dtb_dst): $(O)/%.dtb : $(O)/%.dts.pre
@echo " DTC $@"
- @$(DTC) $(DTC_FLAGS) -i$(LINUX)/$(dir $<) -o $@ $<
+ @$(DTC) $(DTC_FLAGS) -i$(LINUX)/$(patsubst $(O)/%,%,$(dir $@)) -o $@ $<
dtbs: $(dtb_dst)