[ccan] [PATCH 4/4] Correctly include dependencies for nested modules

David Gibson david at gibson.dropbear.id.au
Sat Apr 30 18:01:49 AEST 2016


Currently we pull auto-generated dependencies into the Makefile with
include ccan/*/*.d.  That will omit any .d files from nested modules,
meaning things might not be correctly rebuilt there.

Correct this by using the list of modules instead of a 1-level wildcard.

Signed-off-by: David Gibson <david at gibson.dropbear.id.au>
---
 Makefile-ccan | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile-ccan b/Makefile-ccan
index f4e096b..bd6af5c 100644
--- a/Makefile-ccan
+++ b/Makefile-ccan
@@ -136,7 +136,7 @@ default: libccan.a
 
 # Automatic dependency generation: makes ccan/*/*.d files.
 DEPGEN=-MMD
--include ccan/*/*.d
+-include $(foreach m, $(MODS), ccan/$(m)/*.d)
 
 # Anything with C files needs building; dir leaves / on, sort uniquifies
 DIRS=$(patsubst %/, %, $(sort $(foreach m, $(filter-out $(MODS_EXCLUDE), $(MODS_WITH_SRC)), $(dir $(wildcard ccan/$m/*.c)))))
-- 
2.5.5



More information about the ccan mailing list