Generate a dependency map from a naïve module system.