]> git.ozlabs.org Git - ccan/commitdiff
Correctly include dependencies for nested modules
authorDavid Gibson <david@gibson.dropbear.id.au>
Tue, 16 Feb 2016 12:35:41 +0000 (23:35 +1100)
committerDavid Gibson <david@gibson.dropbear.id.au>
Fri, 29 Apr 2016 23:18:28 +0000 (09:18 +1000)
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@gibson.dropbear.id.au>
Makefile-ccan

index f4e096b55034a63a6920f4564725db8b4fb221f6..bd6af5ca35274bf411369b47b34bc56afa71260e 100644 (file)
@@ -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)))))