Skip to contentSkip to conversation

dtc: Add missing dependencies for tests

PATCH Applied David Gibson 2 participants 2 messages Nov 12, 2007 – Nov 13, 2007 Kbuild

lore
Share & tools
lore
#0 lore raw

At present, the Makefiles will not rebuild trees.o or the dtb files derived from it if testdata.h is updated. This is incorrect, and is because of missing dependency information.

This patch fixes the problem by making sure that dependency information is generated from trees.S and dumptrees.c.

Makefile +4 -0
Index: dtc/Makefile
===================================================================
@@ -188,6 +188,10 @@ clean: libfdt_clean tests_clean
 	@$(VECHO) DEP $<
 	$(CC) $(CPPFLAGS) -MM -MG -MT "$*.o $@" $< > $@
 
+%.d: %.S
+	@$(VECHO) DEP $<
+	$(CC) $(CPPFLAGS) -MM -MG -MT "$*.o $@" $< > $@
+
 %.i:	%.c
 	@$(VECHO) CPP $@
 	$(CC) $(CPPFLAGS) -E $< > $@
tests/Makefile.tests +2 -1
Index: dtc/tests/Makefile.tests
===================================================================
@@ -21,7 +21,8 @@ TESTS_TREES = $(TESTS_TREES_L:%=$(TESTS_
 
 TESTS_TARGETS = $(TESTS) $(TESTS_TREES)
 
-TESTS_DEPFILES = $(TESTS:%=%.d) $(TESTS_PREFIX)testutils.d
+TESTS_DEPFILES = $(TESTS:%=%.d) \
+	$(addprefix $(TESTS_PREFIX),testutils.d trees.d dumptrees.d)
 
 TESTS_CLEANFILES_L =  *.output vgcore.* *.dtb *.test.dts
 TESTS_CLEANFILES = $(TESTS_CLEANFILES_L:%=$(TESTS_PREFIX)%)
Signature · 4 lines
David Gibson			| I'll have my music baroque, and my code
david AT gibson.dropbear.id.au	| minimalist, thank you.  NOT _the_ _other_
				| _way_ _around_!
http://www.ozlabs.org/~dgibson
Applied
#1 lore raw

So, like, the other day David Gibson mumbled:

Quoted 8 lines

At present, the Makefiles will not rebuild trees.o or the dtb files derived from it if testdata.h is updated. This is incorrect, and is because of missing dependency information.

This patch fixes the problem by making sure that dependency information is generated from trees.S and dumptrees.c.

Applied.

jdl