Browse Source

Correctly include dependencies for nested modules

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>
David Gibson 10 years ago
parent
commit
64b9c66673
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Makefile-ccan

+ 1 - 1
Makefile-ccan

@@ -136,7 +136,7 @@ default: libccan.a
 
 
 # Automatic dependency generation: makes ccan/*/*.d files.
 # Automatic dependency generation: makes ccan/*/*.d files.
 DEPGEN=-MMD
 DEPGEN=-MMD
--include ccan/*/*.d
+-include $(foreach m, $(MODS), ccan/$(m)/*.d)
 
 
 # Anything with C files needs building; dir leaves / on, sort uniquifies
 # 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)))))
 DIRS=$(patsubst %/, %, $(sort $(foreach m, $(filter-out $(MODS_EXCLUDE), $(MODS_WITH_SRC)), $(dir $(wildcard ccan/$m/*.c)))))