function make_generate_print

8.0.x make_generate_print($contents, $file = NULL)
7.x make_generate_print($contents, $file = NULL)
master make_generate_print($contents, $file = NULL)

Print the generated makefile to the terminal, or write it to a file.


$contents: The formatted contents of a makefile.

$file: (optional) The path to write the makefile.

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


commands/make/, line 241
Functions for the generate makefile command.


function make_generate_print($contents, $file = NULL) {
  if (!$file) {
  elseif (file_put_contents($file, $contents)) {
    drush_log(dt("Wrote .make file @file", array('@file' => $file)), LogLevel::OK);
  else {
    make_error('FILE_ERROR', dt("Unable to write .make file !file", array('!file' => $file)));