sweetser has asked for the wisdom of the Perl Monks concerning the following question:

Hello:

I am trying to create two Perl modules for distribution both as a tarball and a debian package. Using Module::Build, I have succeeded with the first task, even putting some extra images files in the right location. When using new, I pass in create_makefile_pl => 'passthrough' which I would think is all that is needed to create a makefile. Perhaps I am naive, and hope to receive enlightenment.

doug

use strict; use Module::Build; my $build = Module::Build->new ( module_name => 'CLQ::QGraphGnuplot', license => 'GPL2.0', create_makefile_pl => 'passthrough', dist_author => 'sweetser@alum.mit.edu', dist_version_from => 'lib/CLQ/QGraphGnuplot.pm', include_dirs => ['Images', 'Html_templates'], requires => { 'Data::Dumper' => 0, 'FileHandle' => 0, 'File::Basename' => 0, 'File::Find' => 0, 'File::Spec' => 0, 'List::Util' => 0 } ); my $build2 = Module::Build->new ( module_name => 'CLQ::QGraphImagemagick', license => 'GPL2.0', create_makefile_pl => 'passthrough', dist_author => 'sweetser@alum.mit.edu', dist_version_from => 'lib/CLQ/QGraphImagemagick.pm', ); push @{$build->build_elements}, 'png', 'html'; $build2->create_build_script; $build->create_build_script;

Replies are listed 'Best First'.
Re: Build.PL not generating Makefile.PL
by ysth (Canon) on Dec 10, 2006 at 18:13 UTC
    Does it work if you are doing only one module? Do you see the "Creating Makefile.PL" message when you do ./Build.PL dist? What version of Module::Build are you seeing this happen with?
      I see what I was missing. I am using automake. To generate the Makefile.PL, I need to use "Build dist", and then Makefile.PL is created. So I have added that to Makefile.am

      Thanks,
      doug

Re: Build.PL not generating Makefile.PL
by adrianh (Chancellor) on Dec 11, 2006 at 00:37 UTC
    When using new, I pass in create_makefile_pl => 'passthrough' which I would think is all that is needed to create a makefile. Perhaps I am naive, and hope to receive enlightenment.

    I'm guessing you're thinking that create_build_script() creates the Makefile.PL. It doesn't :-)

    The make file is created by ACTION_distmeta(), so you'll need to run this explicitly using the command like (via ./Build distmeta or one of the other actions that call this like ./Build dist) or by calling it in explicitly in your Build.PL