function make_generate_makefile_contents

8.0.x generate.contents.make.inc make_generate_makefile_contents($projects, $libraries, $core, $defaults)
master generate.contents.make.inc make_generate_makefile_contents($projects, $libraries = array(), $core = NULL, $defaults = array())

Generate makefile contents in the appropriate format.

2 calls to 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 232
Functions for the generate makefile command.

Code

function make_generate_makefile_contents($projects, $libraries = array(), $core = NULL, $defaults = array()) {
  $format = drush_get_option('format', 'yaml');
  $func = "make_generate_makefile_contents_$format";
  if (function_exists($func)) {
    $contents = call_user_func($func, $projects, $libraries, $core, $defaults);
  }
  else {
    return drush_set_error('MAKE_UNKNOWN_OUTPUT_FORMAT', dt('Generating makefiles in the :format output format is not yet supported. Implement :func() to add such support.', array(':format' => $format, ':func' => $func)));
  }
  return $contents;
}