Paul_A/V has asked for the wisdom of the Perl Monks concerning the following question:

I am building a module using ExtUtils::MakeMaker. I am having a difficult time trying to find a way to specify binary files that I want to install with the module into the Perl/bin or Perl/site/bin paths. There is a EXE_FILES attribute but this is strictly for specifying Perl scripts to include with the module. Short of hard coding the copying of these files to the INST_BIN path into the Makefile.PL, is there any other way to do this using MakeMaker functionality?
Respectfully, Paul
  • Comment on ExtUtils::MakeMaker - Specifying binary files to include in module install

Replies are listed 'Best First'.
Re: ExtUtils::MakeMaker - Specifying binary files to include in module install
by syphilis (Archbishop) on Mar 28, 2007 at 00:05 UTC
    There is a EXE_FILES attribute but this is strictly for specifying Perl scripts to include with the module

    Are you sure about that ? I find that any file specified in EXE_FILES gets installed into INSTALLBIN (irrespective of what that file contained).

    Cheers,
    Rob
    Update:Minor correction - changed "INST_BIN" to "INSTALLBIN".
    Update: However, this is probably not the ideal way to go about it. On Win32, not only does the EXE_FILE get installed into INSTALLBIN, but a copy of that file ("converted" to a batch file, and given a '.bat' extension) is also installed into INSTALLBIN - the assumption apparently being that EXE_FILE's are, in fact, supposed to be executable.
      When I list them in EXE_FILES they get processed by pl2bat so what ends up in Perl/bin is a *.exe and a *.exe.bat This is messy and so I was trying to find a cleaner way of doing this. Thanks.

      Respectfully,

      Paul
Re: ExtUtils::MakeMaker - Specifying binary files to include in module install
by Paul_A/V (Initiate) on Apr 02, 2007 at 20:55 UTC
    I discovered a solution for this. MakeMaker configures the build to execute any *.PL (caps required on extenstion) files in the same directory as the Makefile when 'make' and 'make install' are executed.
    Respectfully, Paul