Generating a list of submodules dependencies