function DrushMakeProject::recurse

8.0.x make.project.inc DrushMakeProject::recurse($path)
6.x make.project.inc DrushMakeProject::recurse($path)
7.x make.project.inc DrushMakeProject::recurse($path)
5.x make.project.inc DrushMakeProject::recurse($path)
master make.project.inc DrushMakeProject::recurse($path)

Recurse to process additional makefiles that may be found during processing.

1 call to DrushMakeProject::recurse()
DrushMakeProject::make in commands/make/make.project.inc
Build a project.
1 method overrides DrushMakeProject::recurse()
DrushMakeProject_Library::recurse in commands/make/make.project.inc
No recursion for libraries, sorry :-(

File

commands/make/make.project.inc, line 545
Drush Make processing classes.

Class

DrushMakeProject
The base project class.

Code

function recurse($path) {
  if (!$this->do_recursion || drush_get_option('no-recursion')) {
    drush_log(dt("Preventing recursive makefile parsing for !project", array("!project" => $this->name)), LogLevel::INFO);
    return TRUE;
  }
  $candidates = array(
    $this->name . '.make.yml',
    $this->name . '.make',
    'drupal-org.make.yml',
    'drupal-org.make',
  );
  $makefile = FALSE;
  foreach ($candidates as $filename) {
    if (file_exists($this->download_location . '/' . $filename)) {
      $makefile = $this->download_location . '/' . $filename;
      break;
    }
  }

  if (!$makefile) {
    return TRUE;
  }

  drush_log(dt("Found makefile: !makefile", array("!makefile" => basename($makefile))), LogLevel::OK);

  // Save the original state of the 'custom' context.
  $custom_context = &drush_get_context('custom');
  $original_custom_context_values = $custom_context;

  $info = make_parse_info_file($makefile, TRUE, $this->options);
  if (!($info = make_validate_info_file($info))) {
    $result = FALSE;
  }
  else {
    // Inherit the translations specified in the extender makefile.
    if (!empty($this->translations)) {
      $info['translations'] = $this->translations;
    }
    // Strip out any modules that have already been processed before this.
    foreach ($this->manifest as $name) {
      unset($info['projects'][$name]);
    }
    $build_path = $this->buildPath($this->name);
    make_projects(TRUE, trim($build_path, '/'), $info, $this->build_path, $this->download_location);
    make_libraries(TRUE, trim($build_path, '/'), $info, $this->build_path, $this->download_location);
    $result = TRUE;
  }
  // Restore original 'custom' context so that any
  // settings changes made are used.
  $custom_context = $original_custom_context_values;

  return $result;
}