diff --git drush_make.generate.inc drush_make.generate.inc index e9a355e..3c04d84 100644 --- drush_make.generate.inc +++ drush_make.generate.inc @@ -48,21 +48,39 @@ function _drush_generate_makefile($file) { foreach ($project_info as $item) { $name = $item->name; $type = $item->type; - if ($item->info['project'] != 'drupal' && $item->info['project'] == $name) { + if ($item->info['project'] != 'drupal') { if (($item->type == 'module') && (!$item->status)) { continue; } - $updatexml = _drush_generate_makefile_updatexml($name, $type, $item->info); - $projects[$name] = array('_type' => $type); + if ($item->info['project'] && ($item->info['project'] != $name)) { + $is_subproject = TRUE; + $project_name = $item->info['project']; + $updatexml = NULL; + } + else { + $is_subproject = FALSE; + $project_name = $name; + $updatexml = _drush_generate_makefile_updatexml($project_name, $type, $item->info); + } + // Only worry about a project when we're on the first subproject + if ($is_subproject && $projects[$project_name]) { + continue; + } + + $projects[$project_name] = array('_type' => $type); if ($updatexml) { - $projects[$name]['type'] = $type; - $projects[$name]['custom_download'] = TRUE; + $projects[$project_name]['type'] = $type; + $projects[$project_name]['custom_download'] = TRUE; + } + // So far drupal_get_path can only work with modules, not projects + if (!$is_subproject) { + $projects[$project_name] += _drush_generate_makefile_check_location($name, $type); } - $projects[$name] += _drush_generate_makefile_check_location($name, $type);