Compile submodules before modules.