docs: public static Map<String, List<String>> buildDepsForModulelist(
          List<String> moduleNames,
          String rfsAbsPath,
          boolean mode)
      throws CmsConfigurationException {
  
          Map<String, List<String>> ret = buildDepsForAllModules(rfsAbsPath, mode);
          Iterator<CmsModule> itMods;
          if (rfsAbsPath == null) {
              itMods = OpenCms.getModuleManager().getAllInstalledModules().iterator();
          } else {
              itMods = getAllModulesFromPath(rfsAbsPath).keySet().iterator();
          }
          while (itMods.hasNext()) {
              CmsModule module = itMods.next();
              if (!moduleNames.contains(module.getName())) {
                  Iterator<List<String>> itDeps = ret.values().iterator();
                  while (itDeps.hasNext()) {
                      List<String> dependencies = itDeps.next();
                      dependencies.remove(module.getName());
                  }
                  ret.remove(module.getName());
              }
          }
          return ret;
      }