Skip to contentSkip to conversation

dtc: Make make print a message when linking testcases

PATCH Applied David Gibson 2 participants 2 messages Aug 31, 2007 Kbuild

lore
Share & tools
lore
#0 lore raw

Currently, dtc relies on make's implicit rule to build the testcases. This means that when not making verbosely (V=0, the default) there is no message at all while relinking the testsuites. This can be very confusing when updating libfdt.a (upon which the testcases depend) and make appears to do nothing.

This patch corrects the situation, borrowing the rule used to link dtc itself to link all the testcases as well.

Makefile +4 -2
Index: dtc/Makefile
===================================================================
@@ -101,8 +101,6 @@
 	$(LEX) $<
 
 dtc: $(DTC_OBJS)
-	@$(VECHO) LD $@
-	$(LINK.c) -o $@ $^
 
 ftdump:	ftdump.o
 
@@ -168,6 +166,10 @@
 #
 # Generic compile rules
 #
+%: %.o
+	@$(VECHO) LD $@
+	$(LINK.c) -o $@ $^
+
 %.o: %.c
 	@$(VECHO) CC $@
 	$(CC) $(CPPFLAGS) $(CFLAGS) -o $@ -c $<
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 10 lines

Currently, dtc relies on make's implicit rule to build the testcases. This means that when not making verbosely (V=0, the default) there is no message at all while relinking the testsuites. This can be very confusing when updating libfdt.a (upon which the testcases depend) and make appears to do nothing.

This patch corrects the situation, borrowing the rule used to link dtc itself to link all the testcases as well.

Applied.

Thanks,
jdl