summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Gibson <david@gibson.dropbear.id.au>2007-11-13 09:52:58 +1100
committerJon Loeliger <jdl@freescale.com>2007-11-13 07:33:01 -0600
commitf6588bc32fd46d63da6058f37ce799ab948c3513 (patch)
tree8d950c9dfd2a564067f0665d9a74118f9314c532
parent91967acabdfbff8b44fd3a19f432bc6e690df8cc (diff)
downloaddevice-tree-compiler-f6588bc32fd46d63da6058f37ce799ab948c3513.tar.gz
dtc: Add missing dependencies for tests
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. Signed-off-by: David Gibson <david@gibson.dropbear.id.au>
-rw-r--r--Makefile4
-rw-r--r--tests/Makefile.tests3
2 files changed, 6 insertions, 1 deletions
diff --git a/Makefile b/Makefile
index 4d4b98e..9f9bee0 100644
--- a/Makefile
+++ b/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 $< > $@
diff --git a/tests/Makefile.tests b/tests/Makefile.tests
index 8ee0e5d..ec589aa 100644
--- a/tests/Makefile.tests
+++ b/tests/Makefile.tests
@@ -21,7 +21,8 @@ TESTS_TREES = $(TESTS_TREES_L:%=$(TESTS_PREFIX)%)
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)%)