function make_prepare_libraries

8.0.x make.drush.inc make_prepare_libraries($recursion, $info, $contrib_destination = '', $build_path = '', $make_dir = '')
7.x make.drush.inc make_prepare_libraries($recursion, $info, $contrib_destination = '', $build_path = '', $make_dir = '')
master make.drush.inc make_prepare_libraries($recursion, $info, $contrib_destination = '', $build_path = '', $make_dir = '')

Gather additional data on all libraries specified in the make file.

1 call to make_prepare_libraries()
make_libraries in commands/make/make.drush.inc
Process all libraries specified in the make file.

File

commands/make/make.drush.inc, line 583
Drush Make commands.

Code

function make_prepare_libraries($recursion, $info, $contrib_destination = '', $build_path = '', $make_dir = '') {
  // Nothing to make if the libraries list is empty.
  if (empty($info['libraries'])) {
    return;
  }

  $libraries = array();
  $ignore_checksums = drush_get_option('ignore-checksums');
  foreach ($info['libraries'] as $key => $library) {
    if (!is_string($key) || !is_array($library)) {
      // TODO Print a prettier message.
      continue;
    }
    // Merge the known data onto the library info.
    $library += array(
      'name' => $key,
      'core' => $info['core'],
      'build_path' => $build_path,
      'contrib_destination' => $contrib_destination,
      'subdir' => '',
      'directory_name' => $key,
      'make_directory' => $make_dir,
    );
    if ($ignore_checksums) {
      unset($library['download']['md5']);
    }
    $libraries[$key] = $library;
  }
  if (!$recursion) {
    drush_set_option('DRUSH_MAKE_LIBRARIES', $info['libraries']);
  }
  return $libraries;
}