Configure: Fix failure in generating depfile

When working on a new project, the depfile needs to be generated.
However the modules are not always prepared, or if they are prepared,
they could get overwritten.

In this patch a fix is made, that initialises the modules, and helps
make sure the modules are not then reinitialised.

Signed-off-by: Bart Kuivenhoven <bemkuivenhoven@gmail.com>