function _drush_make_generate_makefile_contents

8.0.x generate.contents.make.inc _drush_make_generate_makefile_contents($projects, $libraries = array(), $core_version = NULL, $defaults = array())
6.x generate.make.inc _drush_make_generate_makefile_contents($projects, $libraries = array())
7.x generate.contents.make.inc _drush_make_generate_makefile_contents($projects, $libraries = array(), $core_version = NULL, $defaults = array())
5.x generate.make.inc _drush_make_generate_makefile_contents($projects, $libraries = array())
master generate.contents.make.inc _drush_make_generate_makefile_contents($projects, $libraries = array(), $core_version = NULL, $defaults = array())

Generate the actual contents of the .make file.

2 calls to _drush_make_generate_makefile_contents()
drush_make_generate in commands/make/generate.make.inc
Drush callback; generate makefile from the current build.
make_generate_from_makefile in commands/make/generate.contents.make.inc
Write a makefile based on data parsed from a previous makefile.

File

commands/make/generate.contents.make.inc, line 12
Functions for the generate makefile command.

Code

function _drush_make_generate_makefile_contents($projects, $libraries = array(), $core_version = NULL, $defaults = array()) {
  if (is_null($core_version)) {
    $core_version = drush_get_drupal_core_compatibility();
  }

  $header = array();
  $header[] = '; This file was auto-generated by drush make';
  $header['core'] = $core_version;
  $header['api'] = MAKE_API;
  $header[] = '';
  if (!empty($defaults)) {
    _drush_make_generate_defaults($defaults, $header);
    $header[] = '';
  }
  $header[] = '; Core';

  return _drush_make_generate_makefile_body($projects, $header) . _drush_make_generate_makefile_body($libraries);
}