diff options
author | Simon Glass <sjg@chromium.org> | 2021-03-24 20:40:49 +0300 |
---|---|---|
committer | Simon Glass <sjg@chromium.org> | 2021-03-26 07:03:08 +0300 |
commit | 6519da47411e90322c59e3fa4b41ff398ff0a688 (patch) | |
tree | fe83aabd9cefc8712d52b5e9ed10aab57c16fda0 /scripts | |
parent | 91f414b3a82e5e8419a0ad703b7055884c4be254 (diff) | |
download | u-boot-6519da47411e90322c59e3fa4b41ff398ff0a688.tar.xz |
Makefile: Avoid running dtoc every time
Since the dst_dir rule always runs, it causes a rebuild of the of-platdata
files even if not needed.
Create the directory inside the rule instead.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/Makefile.spl | 12 |
1 files changed, 7 insertions, 5 deletions
diff --git a/scripts/Makefile.spl b/scripts/Makefile.spl index 849e9c7060..4f5876dad9 100644 --- a/scripts/Makefile.spl +++ b/scripts/Makefile.spl @@ -330,12 +330,10 @@ $(obj)/dts/dt-%.o: $(obj)/dts/dt-%.c \ include/generated/dt-structs-gen.h prepare FORCE $(call if_changed,plat) -PHONY += dts_dir -dts_dir: - $(shell [ -d $(obj)/dts ] || mkdir -p $(obj)/dts) - +# Don't use dts_dir here, since it forces running this expensive rule every time include/generated/dt-structs-gen.h $(u-boot-spl-platdata_c) &: \ - $(obj)/$(SPL_BIN).dtb dts_dir FORCE + $(obj)/$(SPL_BIN).dtb + @[ -d $(obj)/dts ] || mkdir -p $(obj)/dts $(call if_changed,dtoc) ifdef CONFIG_SAMSUNG @@ -476,6 +474,10 @@ FORCE: $(obj)/dts/dt-$(SPL_NAME).dtb: dts/dt.dtb $(Q)$(MAKE) $(build)=$(obj)/dts spl_dtbs +PHONY += dts_dir +dts_dir: + $(shell [ -d $(obj)/dts ] || mkdir -p $(obj)/dts) + # Declare the contents of the .PHONY variable as phony. We keep that # information in a variable so we can use it in if_changed and friends. .PHONY: $(PHONY) |