[Pdbg] [PATCH] Makefile.am: Fix dependencies for specific .dtb.o files

Cyril Bur cyrilbur at gmail.com
Mon Dec 11 11:39:16 AEDT 2017


The dtb.o files should really only depend on the .dtb files which is
already covered by the `%.dtb.o: %.dtb` rule. So remove the specific
p9{w,r,z}-fsi.dtb.o rules.

.dtb files which need an include file should depend depend on those and
their source file. The `%.dtb: %.dts` does not cover this, so
p9w-fsi.dtb, p9r-fsi.dtb and p9z-fsi.dtb should have an added
dependency currently not listed. Add those targets and dependencies,
also mark them as .INTERMEDIATE just like the %.dtb implicitly is.

This patch fixes parallel build failure:
(CDPATH="${ZSH_VERSION+.}:" && cd . && /bin/sh /home/cyrilb/r/pdbg/review/missing autoheader)
rm -f stamp-h1
touch config.h.in
cd . && /bin/sh ./config.status config.h
config.status: creating config.h
config.status: config.h is unchanged
make --no-print-directory all-am
  DTC      fake.dtb
  M4       p8-fsi.dts
  M4       p8-i2c.dts
  M4       p8-host.dts
  M4       p9-fsi.dtsi
  DTC      p9w-fsi.dtb
Error: p9w-fsi.dts:8.1-6 Label or path fsi0 not found
FATAL ERROR: Syntax error parsing input tree
  DTC      p9z-fsi.dtb
make[1]: *** [Makefile:1281: p9w-fsi.dtb] Error 1
make[1]: *** Waiting for unfinished jobs....
  DTC      p9r-fsi.dtb
rm p9w-fsi.dtb p9r-fsi.dtb p8-host.dts p9z-fsi.dtb p8-i2c.dts fake.dtb p8-fsi.dts
make: *** [Makefile:442: all] Error 2

Which can be caused by invoking make with `-j 8` from a fresh checkout.

Signed-off-by: Cyril Bur <cyrilbur at gmail.com>
---
 Makefile.am | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/Makefile.am b/Makefile.am
index 38a66c4..b817893 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -66,9 +66,10 @@ DTC_V_0	= @echo "  DTC     " $@;
 %.dtsi: %.dtsi.m4
 	$(M4_V)m4 -I$(dir $<) $< > $@
 
-p9w-fsi.dtb.o: p9w-fsi.dts p9-fsi.dtsi
-p9r-fsi.dtb.o: p9r-fsi.dts p9-fsi.dtsi
-p9z-fsi.dtb.o: p9z-fsi.dts p9-fsi.dtsi
+.INTERMEDIATE: p9w-fsi.dtb p9r-fsi.dtb p9z-fsi.dtb
+p9w-fsi.dtb: p9-fsi.dtsi
+p9r-fsi.dtb: p9-fsi.dtsi
+p9z-fsi.dtb: p9-fsi.dtsi
 
 %.dtb: %.dts
 	$(DTC_V)dtc -q -i$(dir $@) -I dts $< -O dtb > $@
-- 
2.15.1



More information about the Pdbg mailing list