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.

2 string references to 'drush_make'
drush_filename_blacklist in includes/command.inc
Substrings to ignore during commandfile and site alias searching.
makeMakefileCase::listMakefileTests in tests/makeTest.php

File

commands/make/make.drush.inc, line 251
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();

  // Build.
  if (!drush_get_option('no-build', FALSE)) {
    $info = make_parse_info_file($makefile);
    drush_log(dt('Beginning to build !makefile.', array('!makefile' => $makefile)), LogLevel::OK);

    // Default contrib destination depends on Drupal core version.
    $core_version = str_replace('.x', '', $info['core'][0]);
    $sitewide = drush_drupal_sitewide_directory($core_version);
    $contrib_destination = drush_get_option('contrib-destination', $sitewide);

    $build_path = make_build_path($build_path);
    $make_dir = realpath(dirname($makefile));

    $success = make_projects(FALSE, $contrib_destination, $info, $build_path, $make_dir);
    if ($success) {
      make_libraries(FALSE, $contrib_destination, $info, $build_path, $make_dir);

      if (drush_get_option('prepare-install')) {
        make_prepare_install($build_path);
      }
      if ($option = drush_get_option('md5')) {
        $md5 = make_md5();
        if ($option === 'print') {
          drush_print($md5);
        }
        else {
          drush_log(dt('Build hash: %md5', array('%md5' => $md5)), LogLevel::OK);
        }
      }
      // Only take final build steps if not in testing mode.
      if (!drush_get_option('test')) {
        if (drush_get_option('tar')) {
          make_tar($build_path);
        }
        else {
          make_move_build($build_path);
        }
      }
      make_clean_tmp();
    }
  }

  // Process --lock.
  if (drush_get_option('lock', FALSE)) {
    return make_generate_from_makefile(drush_get_option('lock'), $makefile);
  }

  // Used by core-quick-drupal command.
  // @see drush_core_quick_drupal().
  return $info;
}