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

David Gibson <[email protected]> Sat, 30 Apr 2016 18:01:49 +1000
Newsgroups org.ozlabs.lists.ccan
Message-ID <[email protected]>
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 <[email protected]>
---
 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

_______________________________________________
ccan mailing list
[email protected]
https://lists.ozlabs.org/listinfo/ccan