function drush_make

8.0.x make.drush.inc drush_make($makefile = NULL, $build_path = NULL)
6.x make.drush.inc drush_make($makefile = NULL, $build_path = NULL)
7.x make.drush.inc drush_make($makefile = NULL, $build_path = NULL)
5.x make.drush.inc drush_make($makefile = NULL, $build_path = NULL)
master make.drush.inc drush_make($makefile = NULL, $build_path = NULL)

Drush callback; make based on the makefile.

3 string references to 'drush_make'
drush_filename_blacklist in includes/command.inc
Substrings to ignore during commandfile searching.
makeMakefileCase::getMakefile in tests/makeTest.php
_drush_add_commandfiles in includes/command.inc

File

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

Code

function drush_make($makefile = NULL, $build_path = NULL) {
  // Set the cache option based on our '--no-cache' option.
  _make_enable_cache();

  // If --version option is supplied, print it and bail.
  if (drush_get_option('version', FALSE)) {
    drush_print(dt('Drush make API version !version', array('!version' => MAKE_API)));
    drush_print_pipe(MAKE_API);
    return;
  }

  if (!($build_path = make_build_path($build_path))) {
    return FALSE;
  }

  $info = make_parse_info_file($makefile);

  // Support making just a portion of a make file.
  $include_only = array(
    'projects' => array_filter(drush_get_option_list('projects')),
    'libraries' => array_filter(drush_get_option_list('libraries')),
  );
  $info = make_prune_info_file($info, $include_only);

  if ($info === FALSE || ($info = make_validate_info_file($info)) === FALSE) {
    return FALSE;
  }

  drush_log(dt('Beginning to build !makefile.', array('!makefile' => $makefile)), 'ok');

  $make_dir = realpath(dirname($makefile));
  $core_version = str_replace('.x', '', $info['core'][0]);
  $sitewide = drush_drupal_sitewide_directory($core_version);
  if (make_projects(FALSE, drush_get_option('contrib-destination', $sitewide), $info, $build_path, $make_dir)) {
    make_libraries(drush_get_option('contrib-destination', $sitewide), $info, $build_path, $make_dir);

    if (drush_get_option('prepare-install')) {
      make_prepare_install($build_path);
    }
  }
  return $info;
}